<template>
	<view class="content">


		<view class="d-kuan-juzhong  d-beijing-hui3">
			<!--头部-->
    	    <view class="d-kuan pc-dingbu">
    	        <DToubu ref="dToubu" 
				@clear-audio="clearAllAudio" 
				@login-success="handleLogin"
				@logout-success="handleLogout"
				:dengluxianshi="denglu_xianshi"
				@update-dengluxianshi="handleUpdateDengluxianshi"
				@uiddata="handleUiddata"
				></DToubu>
    	    </view>
		
			<!--头部-->
			<!--下面内容-->
			<view class="d-kuan d-buhuanhang" >
				<!--左边导航-->
				<view class="d-daohang d-you-10 pc-yincang d-shang-20" id="zuo-daohang" :style="{height: leftNavHeight}">
					<view class="d-daohang-5">
						<Ddaohang  @denglu-fabu="denglu_fabu"></Ddaohang>
					</view>
				</view>
				<!--左边导航-->
				<!--右边内容 margin-left: 520rpx-->
				<view class="d-kuan pc-zuo-520">
					<uv-row customStyle="margin-bottom: 10px;align-items: flex-start;" :gutter="20">
						<uv-col span="8" id="zhongjiankuan" customStyle="align-items: flex-start;">
							<view  class="d-kuan d-beijing-bai you-guding d-pinglun-0" :style="{height: leftNavHeight,width: zhongjianWidth}">
								<view class=""  style="height: 100%; display: flex; flex-direction: column;">
									<view class="d-kuan guntiao" style="height: 100%; overflow-y: auto;margin-bottom: 110rpx;">

										    <!--返回-->
											<view class="d-guding-1" >
												<uv-navbar leftText="返回" :fixed="false" title="帖子详情" :safeAreaInsetTop="false" customStyle="border-radius: 20rpx;" bgColor="#f3f3f3">
			                						<template v-slot:left >
			                							<view class="uv-nav-slot" @click="fanhui">
			                								<uv-icon name="arrow-left" size="19" ></uv-icon>
			                								<!--uv-line direction="column" :hairline="false" length="16" margin="0 8px"></uv-line-->
			                								<!--uv-icon name="home" size="20"></uv-icon-->
			                							</view>
			                						</template>
													<!--template v-slot:right>
														<view class="d-biaoqian d-shang-5" >
															<uv-tags 
															@click="quan_url(cid)"
															:text="tie.quanzi" 
															type="success" 
															shape="circle" 
															
															plain 
															plainFill
															bgColor="#ffffff"
															borderColor="#02c7b6"
															color="#02c7b6"
															iconColor="#02c7b6"
															></uv-tags>
														</view>
													</template-->
			                					</uv-navbar>
											</view>
											<view v-if="tie.quan_xinxi ==1" class="d-bianhua-10 " style="background-color: #eeeeee;">
												<!--圈子-->
												<view class="d-kuan">
													<view class="d-baifen-50 d-zuo d-buhuanhang" @click="quan_url(cid)">
														<view class="d-gaokuang-40 d-kuanggao-40 d-yuanjiao-40 d-box" >
														    <image v-if="tie.quan_tubiao" :src="tie.quan_tubiao" mode="aspectFill" class="d-img-40 d-yuanjiao-50 d-img-anhei"></image>
															<image v-else src="/static/assets/images/avatar.png" mode="aspectFill" class="d-img-40 d-yuanjiao-50 d-img-anhei"></image>
														</view>
														<view class="d-kuan d-zuo-10" >
															<view class="d-wenzi-14 d-jiacu d-wenzi-hei">{{ tie.quan_ming }}</view>
															<view class="d-wenzi-14 d-wenzi-yanse-hui d-buhuanhang">
																<uv-icon name="file-text" color="#a8a8a8" size="18" :label="'主题：'+tie.quan_tieshu" labelSize="12px" class="d-you-10"></uv-icon>
																<uv-icon name="account-fill" color="#a8a8a8" size="18" labelSize="12px" :label="'成员：'+tie.quan_huiyuan"></uv-icon>
															</view>
														</view>
													</view>
													
													<view  class="d-baifen-50 d-you">
														<view class=" d-neirong-you d-you" >
															<uv-tags 
															v-if="tie.quan_jiaru == 1"
															text="进入圈子" 
															size="mini"
															type="success" 
															shape="circle" 
															icon="list" 
															plain 
															plainFill
															bgColor="#ffffff"
															borderColor="#ffffff"
															color="#7c7c7c"
															iconColor="#7c7c7c"
															@click="quan_url(cid)"
															></uv-tags>

															<uv-tags 
															v-else
															text="加入圈子" 
															size="mini"
															type="success" 
															shape="circle" 
															icon="plus" 
															plain 
															plainFill
															bgColor="#eeeeee"
															borderColor="#eeeeee"
															color="#7c7c7c"
															iconColor="#7c7c7c"
															@click="jiaquan(cid)"
															></uv-tags>


															<!--view v-if="denglu_xianshi == 1" @click="getGuanzhus(index,item.uid)" class="d-you d-kuan-40 d-beijing-hei d-wenzi-yanse-bai-0 d-neikuang-zuoyou-2-shangxia-4 d-wenzi-12 d-yuanjiao-50 d-neirong-juzhong" >已关注</view>
															<view v-else @click="getGuanzhus(index,item.uid)" class="d-kuan-40 d-beijing-hui-f6 d-wenzi-hei d-neikuang-zuoyou-2-shangxia-4 d-wenzi-12 d-yuanjiao-50 d-neirong-juzhong" >关 注</view-->
														</view>
													</view>
												</view>
												<view class="d-clear"></view>

											</view>
											<view v-if="tie.quan_xinxi ==1" class="d-kuan d-yuan-jiao-0" style="position: relative;">
												<view class="d-kuan d-beijing-bai d-yuan-jiao-1" style="background-color: rgb(238, 238, 238);height: 20px;"></view>
												<view class="d-kuan d-beijing-bai d-yuan-jiao-2" style="border-radius: 20px 20px 0 0;height: 20px; position: absolute; top: 0; left: 0; background-color: white;"></view>

											</view>
											<view class="d-bianhua-10  d-beijing-bai">
												<!--头像-->
												<view class="d-kuan">
													<view class="d-baifen-50 d-zuo d-buhuanhang" @click="getgeren(tie.uid)">
														<view class="d-gaokuang-40 d-kuanggao-40 d-yuanjiao-40 d-box" >
														    <image v-if="tie.touxiang" :src="tie.touxiang" mode="aspectFill" class="d-img-40 d-yuanjiao-50 d-beijing-hui d-img-anhei"></image>
															<image v-else src="/static/assets/images/avatar.png" mode="aspectFill" class="d-img-40 d-yuanjiao-50 d-beijing-hui d-img-anhei"></image>
														</view>
														<view class="d-kuan d-zuo-10" >
															<view class=" d-jiacu d-wenzi-hei d-buhuanhang">
																{{ tie.mingcheng }} 
																<uv-tags 
																    v-if="tie.uid == tie.quan_uid" 
																	plain 
																	plainFill 
																	text="圈 主"  
																	size="mini" 
																	class="d-zuo-10"
																	bgColor="#ffffff"
																	borderColor="#02c7b6"
																	color="#02c7b6"
																	iconColor="#7c7c7c"
																	>
																	</uv-tags>
															</view>
															<view class="d-wenzi-14 d-wenzi-yanse-hui d-chaochu-1">{{ tie.fabushijian }}</view>
														</view>
													</view>
													
													<view v-if="tie.uid != uid" class="d-baifen-50 d-you">
														<view class=" d-neirong-you d-you" >
															<uv-tags 
															v-if="guanzhu_panduan==0"
															text="关注" 
															size="mini"
															type="success" 
															shape="circle" 
															icon="plus" 
															plain 
															plainFill
															bgColor="#ffffff"
															borderColor="#02c7b6"
															color="#02c7b6"
															iconColor="#02c7b6"
															@click="postGuanzhu_api()"
															></uv-tags>
															<uv-tags 
															v-else-if="guanzhu_panduan==1"
															text="已关注" 
															size="mini"
															type="success" 
															shape="circle" 
															icon="checkbox-mark" 
															plain 
															plainFill
															bgColor="#ffffff"
															borderColor="#d4d4d4"
															color="#b6b5b5"
															iconColor="#02c7b6"
															@click="postGuanzhu_api()"
															></uv-tags>


															<!--view v-if="denglu_xianshi == 1" @click="getGuanzhus(index,item.uid)" class="d-you d-kuan-40 d-beijing-hei d-wenzi-yanse-bai-0 d-neikuang-zuoyou-2-shangxia-4 d-wenzi-12 d-yuanjiao-50 d-neirong-juzhong" >已关注</view>
															<view v-else @click="getGuanzhus(index,item.uid)" class="d-kuan-40 d-beijing-hui-f6 d-wenzi-hei d-neikuang-zuoyou-2-shangxia-4 d-wenzi-12 d-yuanjiao-50 d-neirong-juzhong" >关 注</view-->
														</view>
													</view>
												</view>
												<view class="d-clear"></view>
												<view class="d-kuan d-buhuanhang d-shang-10">
													<view class="d-kuan-baifen-50">
														<uv-icon name="eye" color="#a8a8a8" labelColor="#a8a8a8" size="20" :label="'浏览: '+tie.hits"></uv-icon>
													</view>
													<view class="d-kuan-baifen-50">
														
														<view style="display: flex; justify-content: flex-end;">
															<uv-icon v-if="tie.uid_admin && tie.uid_admin.is_admin == 1" @click="shenhe_get"  name="checkmark" color="#a8a8a8" labelColor="#a8a8a8" size="20" :label="shenhe_text"></uv-icon>
														
															<uv-icon v-if="tie.uid == uid" @click="edit_get" class="d-zuo-10" name="edit-pen" color="#a8a8a8" labelColor="#a8a8a8" size="20" label="编辑"></uv-icon>
															<uv-icon v-if="tie.uid == uid" @click="yincang_get" class="d-zuo-10" name="eye-off-outline" labelColor="#a8a8a8" color="#a8a8a8" size="20" :label="yingcang_text"></uv-icon>
															<uv-icon v-if="tie.uid == uid"  @click="del_get" class="d-zuo-10" name="trash" labelColor="#a8a8a8" color="#a8a8a8" size="20" label="删除"></uv-icon>
														</view>

													</view>
													
												</view>
												<!--工具-->
												<view v-if="tie.uid_admin && tie.uid_admin.is_admin == 1" class="d-kuan">
													<view class="d-neikuang-10 d-beijing-huise d-yuanjiao-10 d-shang-5 d-buhuanhang">
														<uv-icon name="clock" size="18" @click="jindu_get"></uv-icon>
														<uv-icon name="integral" size="18" @click="chuangyejin_get" class="d-zuo-10"></uv-icon>
														<uv-icon name="mic" size="18" @click="yinpin_get" class="d-zuo-10"></uv-icon>
														<!--uv-icon name="play-circle" size="18" @click="chuangyejin_get" class="d-zuo-10"></uv-icon>
														<uv-icon name="attach" size="18" @click="chuangyejin_get" class="d-zuo-10"></uv-icon>
														<uv-icon name="file-text" size="18" @click="chuangyejin_get" class="d-zuo-10"></uv-icon-->
														<uv-icon name="gift" size="18" @click="huodong_get" class="d-zuo-10"></uv-icon>
														<uv-icon name="heart" size="18" @click="zanzhu_get" class="d-zuo-10"></uv-icon>
														<uv-icon name="attach" size="18" @click="url_get" class="d-zuo-10"></uv-icon> 
														<uv-icon name="download" size="18" @click="fujian_get" class="d-zuo-10"></uv-icon>
													</view>
												</view>
												<!--音频-->
												
												<view v-if="tie.yinpin && tie.yinpin[0] && isAudioSrcValid(tie.yinpin[0])" class="d-shang-10">
													<NlAudioPlayer
													ref="audioPlayer"
													style="margin: 20px 0;"
													:src="tie.yinpin[0]"
													:bar-bg-style="{ borderRadius: '50px' }"
													:bar-style="{ backgroundColor: '#27a393', borderRadius: '50px' }"
													:dot-style="{ width: '30rpx', height: '30rpx', backgroundColor: '#2ebdac' }"
													@error="onAudioError($event, tie.id)"
													>
													</NlAudioPlayer>
												</view>
												<!--视频-->
												<view v-if="tie.shipin_kaiguan == 1 && tie.shipin && tie.shipin[0] && tie.shipin[0].shipin" class="d-shang-10">
													<video 
													class="d-yuanjiao-10 d-kuan d-video-height"
													style="height: 900rpx;"
													:src="tie.shipin && tie.shipin[0] && tie.shipin[0].shipin"
													:poster="tie.shipin && tie.shipin[0] && tie.shipin[0].shipintu" 
													controls
													ref="videoPlayer"
													@play="onVideoPlay"
													@click="closeVideo">
													</video>
												</view>
												<!--图片-->
												<view v-if="tie.tupian_kaiguan == 1 && tie.tupian.length > 0" class="d-shang-10">
													<swiper class="d-kuan" indicator-dots indicator-active-color="#007aff" style="height: 1000rpx;" @change="swiperChange">
														<swiper-item v-for="(item, index) in tie.tupian" :key="index" class="d-kuan d-juzhong d-vertical-juzhong">
															<image 
																:src="item" 
																class="d-yuanjiao-10 d-kuan" 
																mode="aspectFit" 
																style="height: 1000rpx; width: 100%;" 
																@tap="previewImage(index)"
															></image>
														</swiper-item>
													</swiper>
													<!--view v-if="tie.tupian.length > 1" class="d-juzhong d-wenzi-12 d-wenzi-heise d-shang-5">
														{{ currentIndex + 1 }}/{{ tie.tupian.length }}
													</view-->
												</view>
												<!--赞助金-->
												<Dzanzhu_zhanshi
													ref="dZanzhu"
													:id="id"
													:cid="cid"
													:uid="uid"
													:uid_data="uid_data"
													@denglu_weibu="denglu_weibu"
													@zhifu_show="show_zhifu"
												>
												</Dzanzhu_zhanshi>

												<!--创业金-->
												<Dchuangyeji_zhanshi
												    ref="dChuangyejin"  
												    :id="id"
													:cid="cid"
													:uid="uid"
													:uid_data="uid_data"
													@zhifu_show="show_zhifu"
												></Dchuangyeji_zhanshi>
												<!--活动-->
												<Dhuodong_zhanshi
												    ref="dHuodong"  
												    :id="id"
													:cid="cid"
													:uid="uid"
													:uid_data="uid_data"
													:huodong_data_list="huodong_data_list"
													:huodong_data_list_cuozuo="huodong_data_list_cuozuo"
													@zhifu_show="show_zhifu"
													@denglu-fabu="denglu_fabu"
													@refreshData="huodong_data_cunzai_api"
													@getUid_api="getUid_api"
													@baoming_uid_list="baoming_uid_list"
												></Dhuodong_zhanshi>
												
												<!--进度-->
												<view v-if="tie.jindu == 1" class="d-kuan d-juzhong d-shang-20">
													<view class="d-wenzi-14 d-jiacu d-wenzi-hei d-juzhong" style="width: 80%;">
														{{ tie.jindu_index && tie.jindu_index.title }}
													</view>
												</view>

												<uv-steps v-if="tie.jindu == 1" :current="tie.jindu_index && tie.jindu_index.zhuangtai" class="d-shang-20">
													<uv-steps-item title="已准备" customStyle="font-size: 12rpx;" :desc="tie.jindu_index && tie.jindu_index.tianjiashijian"></uv-steps-item>
													<uv-steps-item title="进行中" :desc="tie.jindu_index && tie.jindu_index.kaishishijian"></uv-steps-item>
													<uv-steps-item title="已完成" :desc="tie.jindu_index && tie.jindu_index.jieshushijian"></uv-steps-item>
												</uv-steps>
												<view v-if="tie.jindu == 1" class="d-kuan d-juzhong d-shang-20">
													<view class="d-wenzi-14  d-wenzi-hei d-neikuang-10" style="width: 80%;color: #a8a8a8;">
														{{ tie.jindu_index && tie.jindu_index.beizhu }}
													</view>
													
												</view>
												
												
												<view v-if="tie.jindu == 1 && tie.uid_admin && tie.uid_admin.is_admin == 1" class="d-shang-20" style="display: flex; justify-content: center; align-items: center;">
													<uv-icon name="edit-pen" color="#a8a8a8" size="30" label="修改" @click="jindu_xiugai(tie.jindu_id)"></uv-icon>
													<uv-icon name="trash" color="#a8a8a8" size="28" label="删除" @click="jindu_index_shanchu(tie.id)"></uv-icon>
												</view>
												<view v-if="tie.jindu == 1" class="d-kuan d-juzhong d-shang-20">
													<view class="d-wenzi-14  d-wenzi-hei d-neikuang-10" style="width: 80%;color: #a8a8a8;">
														<uv-steps :current="tie.jindu_index && tie.jindu_index.zhuangtai_data" direction="column">
															<uv-steps-item v-for="(item,index) in jindu_data_list" :key="index" :desc="item.jieshushijian">
																<template  #title>
																	<view class="d-wenzi-14 d-buhuanhang" style="color: #000000;" >
																		<text v-if="item.zhuangtai ==0" class="d-you-10" style="color: #a8a8a8;" >已准备</text>
																		<text v-if="item.zhuangtai ==1" class="d-you-10" style="color: #40a86f;" >进行中</text>   
																		<text v-if="item.zhuangtai ==2" class="d-you-10" style="color: #ce4b09;" >已完成</text>   
																		<text class="d-you-10">{{ item.title }}</text>  
																		<uv-icon v-if="tie.jindu == 1 && tie.uid_admin && tie.uid_admin.is_admin == 1" class="d-you-10" name="edit-pen" color="#a8a8a8" size="20"  @click="jindu_data_xiugai(index,item.id)"></uv-icon>
																		<uv-icon v-if="tie.jindu == 1 && tie.uid_admin && tie.uid_admin.is_admin == 1" name="trash" color="#a8a8a8" size="20"  @click="jindu_data_shanchu(item.id)"></uv-icon>
																	</view>
																</template>
															</uv-steps-item>
															
														</uv-steps>
														
													</view>
												</view>
												<view v-if="tie.jindu == 1 && tie.uid_admin && tie.uid_admin.is_admin == 1" class="d-kuan d-shang-20 d-clear" style="display: flex; justify-content: center; align-items: center;">
													<uv-icon name="plus-circle" color="#a8a8a8" size="20" label="添加进度" @click="jindu_data_add_get(tie.id,tie.cid)"></uv-icon>
												</view>
												<!--URL链接-->
												<Durlzhanshi
												    ref="durl"
													:id="id"
													:cid="cid"
													:uid="uid"
													:uid_data="uid_data"
													:url_data_list="url_data_list"
												>
												</Durlzhanshi>
												
												
												<!--内容-->
												<view class="d-kuan">
													<view class="d-clear"></view>
													<view class="d-kuan d-shang-10">
	                        					        <view class="d-neirong">
															
															<view v-if="tie.uid == uid || tie.uid_admin && tie.uid_admin.is_admin == 1">
																<uv-parse :content="tie.neirong_data" :selectable="true"></uv-parse>
															</view>
															<view v-else>
																<view v-if="tie.quan_jiage > 0 ">
																	<view v-if="tie.yigou==1">
																		<uv-parse :content="tie.neirong_data" :selectable="true"></uv-parse>
																	</view>
																	<view v-else>
																		<view class="d-kuan d-clear" style="display: flex; justify-content: center; align-items: center; min-height: 200rpx;">
																			<view class="d-wenzi-20" 
																				style="color: #000000;text-align: center; padding: 20rpx 40rpx;  border-radius: 10rpx;"
																			>
																				<text >付费圈子，购买后才能查看内容</text>
																			</view>
																			
																		</view>
																		<view class="d-kuan d-clear" style="display: flex; justify-content: center; align-items: center; min-height: 200rpx;">
																			<view class="d-wenzi-20" 
																				style="color: #000000; padding: 20rpx 40rpx; background-color: #f8f8f8; border-radius: 10rpx; display: flex; justify-content: center; align-items: center;"
																			>
																				<view  style="margin-right: 10px;" class="d-you-10">
																					<uv-icon @click="fanhui" name="arrow-left" color="#e8e8e8" size="20" labelSize="20" label="返回"></uv-icon>
																				</view>
																				<view >
																					<uv-icon @click="fanhui_quan(cid)" name="list" color="#e8e8e8" size="20" labelSize="20" label="返回圈子"></uv-icon>
																				</view>
																	</view>
																			
																		</view>
																	</view>

																</view>
																<view v-else>
																	<uv-parse v-if="tie.quan_fuzhi == 1" :content="tie.neirong_data" ></uv-parse>
																	<uv-parse v-else :content="tie.neirong_data" :selectable="true"></uv-parse>
																</view>

															</view>
														</view>
													</view>
												
												
												</view>
												<!--附件下载-->
												<view v-if="tie.fujian && tie.fujian.length > 0" class="d-kuan d-shang-10 d-bian-1-hui d-yuanjiao-10">
													<view class="d-neikuang-20" style="color: #000000;">
														<uv-cell-group v-for="(item,index) in tie.fujian" :key="index" :border="false" customStyle="height: 40px">
															<uv-cell icon="folder" :title="item.title" :border="false">
																<template v-slot:value>
																	<uv-button  type="default" size="small" :plain="true" :hairline="true" icon="download" text="下载" @click="fujian_api(item.url,item.title,tie.quan_jiaru)"></uv-button>
																</template>
															</uv-cell>
														</uv-cell-group>
													</view>
												</view>
											</view>
    	                        		<!--评论框-->
    	                        		<view class="d-pinglun-2 pc-pinglun-gao" >
											<!--评论-->
											<view class="d-kuan  ">
											
													<view class="d-neikuang-10">
														<uv-row customStyle="flex-wrap: wrap;padding: 6rpx;" :gutter="20" wrap>
															<uv-col span="3" >
																
															
															</uv-col>
															<uv-col span="6" >
																<uv-row customStyle="flex-wrap: wrap" :gutter="20" wrap>
																	
																	<uv-col span="4" @click="postShoucang_api(tie.quan_jiaru)">
																		<uv-icon v-if="shoucang_panduan==0" name="heart" color="#bbbbbb" size="28" :label="shoucang_shu" labelColor="#bbbbbb"></uv-icon>
																		<uv-icon v-else-if="shoucang_panduan==1" name="heart" color="#02c7b6" size="28" :label="shoucang_shu" labelColor="#bbbbbb"></uv-icon>
																	</uv-col>
																	<uv-col span="4" >
																		<uv-icon name="chat" @click="tiwenzhi()" color="#bbbbbb" size="28" :label="commentData.readNumer" labelColor="#bbbbbb"></uv-icon>
																	</uv-col>
																	<uv-col span="4" @click="postDianzan_api(tie.quan_jiaru)">
																		<uv-icon v-if="dianzan_panduan==0" name="thumb-up" color="#bbbbbb" size="28" :label="dianzan_shu" labelColor="#bbbbbb"></uv-icon>
																		<uv-icon v-else-if="dianzan_panduan==1"  name="thumb-up" color="#02c7b6" size="28" :label="dianzan_shu" labelColor="#bbbbbb"></uv-icon>
																	</uv-col>
																</uv-row>
															
															</uv-col>
															<uv-col span="3" customStyle="display: flex; justify-content: flex-end; ">
																<view class="d-kuan" style="display: flex; justify-content: flex-end; ">
																	<uv-avatar-group :urls="dianzan_touxiang" size="26" gap="0.4"></uv-avatar-group>
																</view>
															</uv-col>
														</uv-row>
													</view>
													</view>
										</view>
									</view>
								</view>
    	                    </view>

							<!--内容-->
						</uv-col>
						<uv-col class="pc-yincang" span="4" id="youbiankuan" customStyle="align-items: flex-start;">
							<view  class="d-kuan beijing-pinglun you-guding d-pinglun-0" id="yuedu_gao" :style="{height: leftNavHeight,width: rightColWidth,zIndex:'90'}">
							    <view class="d-neikuang-10"  style="height: 100%; display: flex; flex-direction: column;">
									<view class="d-kuan guntiao" style="height: 100%; margin-bottom: 110rpx;">
										<view class="d-clear"></view>
										<!--评论-->
										<view class="d-clear"></view>
										<view class="d-kuan">
											<HbComment 
											    ref="hbComment" 
												@load-more="handleLoadMore"
												@huifu2="huifu_2"
												@add="add"
												@del="del" 
												@like="like" 
												@focusOn="focusOn" 
												@tiwenzhi="tiwenzhi"
												:deleteTip="'确认删除？'"
											    :cmData="commentData" 
												:nodata="no_data"
												v-if="commentData">
											</HbComment>
											<view id="dibu"></view>
							
							
										</view>
							
							
									</view>
								
							
							    </view>
							    <!--评论框-->
							    <view class="d-pinglun-2 pc-pinglun-gao">
									<view class="d-neikuang-10">
										<view v-if="pinglunzxianshi==0" @click.stop="tiwenzhi()">
										    <uv-search    searchIcon="account" placeholder="评论" v-model="tiwenneirong" :showAction="true" actionText="提问" :animation="true"></uv-search>
										</view>
										<view v-if="pinglunzxianshi==1" class="d-kuan d-tijiao-0 " style="position:absolute;bottom:10px;left:0;right:0;height:200rpx;background:#fff;border-top:1px solid #eee">
											<view class="d-neikuang-10">
												<view v-if="pinglun_uid" class="d-tijiao-3">@{{ pinglun_uid }}</view>
												<uv-textarea ref="commentTextarea" @input="pingluninput" @blur="handleTextareaBlur" v-model="tiwenneirong" placeholder="请输入内容"></uv-textarea>
												<view v-if="nickName && yinyong_neirong" class="d-tijiao-4 d-chaochu-1" >{{ nickName }} ： {{ yinyong_neirong }}</view>
												<view class="d-tijiao-1"  @click.stop="tijiao_wenda">提交</view>
												<!--view class="d-tijiao-2" @click.stop="tiwenzhi">
													<uv-icon name="close" size="20" color="#a7a7a7"></uv-icon>
												</view-->
											</view>
										</view>
									</view>
									
							
								</view>
							
							</view>
						</uv-col>
					</uv-row>
				

				</view>
				<!--右边内容-->

			</view>
			<!--下面内容-->

		</view>
		<uv-modal ref="shenhe" 
		title="帖子审核" 
		content='是否通过' 
		
		@confirm="getShenhe_tong_api"
		confirmText="通过"
		@cancel="getShenhe_jujue_api"
		cancelText="拒绝"
		:showCancelButton="true"
		></uv-modal>
		<!--进度工具-->
		<uv-overlay :show="jindu_show" @click="jindu_show = false">
			<view class="warp_jindu">
				<view class="rect_jindu" @tap.stop>
					<uv-cell-group>
						<uv-cell icon="clock" title="进度"></uv-cell>
						
					</uv-cell-group>
					<uv-input placeholder="请填写入标题" border="surround" v-model="jindu_data.title" ></uv-input>
				    <uv-textarea class="d-shang-10" v-model="jindu_data.beizhu" placeholder="请填写备注内容"></uv-textarea>
					<uv-radio-group v-if="jindu_cuozuo==1" class="d-shang-10" v-model="jindu_data.zhuangtai" placement="row">
						<uv-radio name="0" label="已准备" class="d-you-10"></uv-radio>
						<uv-radio name="1" label="进行中" class="d-you-10"></uv-radio>
						<uv-radio name="2" activeColor="red" label="已完成"></uv-radio>
					</uv-radio-group>
				    <uv-button v-if="jindu_cuozuo==0" class="d-shang-10 d-you-10" type="primary" text="添加进度" @click="postJindu_api" ></uv-button>
					<uv-button v-if="jindu_cuozuo==1" class="d-shang-10" type="primary" text="修改" @click="postJindu_xiugai_api(tie.jindu_index && tie.jindu_index.id)"></uv-button>
				</view>
			</view>

		</uv-overlay>
		<!--进度 jindu_data 工具-->
		<uv-overlay :show="jindu_data_show" @click="jindu_data_add_close">
			<view class="warp_jindu">
				<view class="rect_jindu" @tap.stop>
					<uv-cell-group>
						
						<uv-cell icon="clock" title="进度详情"></uv-cell>
					</uv-cell-group>
					<uv-input placeholder="请填写入标题" border="surround" v-model="jindu_data_add.title" ></uv-input>
					<uv-radio-group v-if="jindu_data_list_cuozuo==1" class="d-shang-10" v-model="jindu_data_add.zhuangtai" placement="row">
						<uv-radio name="0" label="已准备" class="d-you-10"></uv-radio>
						<uv-radio name="1" label="进行中" class="d-you-10"></uv-radio>
						<uv-radio name="2" activeColor="red" label="已完成"></uv-radio>
					</uv-radio-group>
				    <uv-button v-if="jindu_data_list_cuozuo==0" class="d-shang-10 d-you-10" type="primary" text="添加进度详情" @click="postJindu_data_add_api" ></uv-button>
					<uv-button v-if="jindu_data_list_cuozuo==1" class="d-shang-10" type="primary" text="修改" @click="postJindu_data_xiugai_api(jindu_data_add.id)"></uv-button>
				</view>
			</view>

		</uv-overlay>
		<!--赞助金-->
		<Dzanzhu
		    ref="zanzhu"
			:zanzhu_data="zanzhu_data"
			:zanzhu_data_list="zanzhu_data_list"
			:zanzhu_data_list_cuozuo="zanzhu_data_list_cuozuo"
			:zanzhu_data_show="zanzhu_data_show"
			:id="id"
			:cid="cid"
			@zanzhu_data_add_close="zanzhu_data_add_close"
		>
		</Dzanzhu>
		<!--创业金-->
		<Dchuangyejin
		    ref="chuangyejin"
			:chuangyejin_data="chuangyejin_data"
			:chuangyejin_data_list="chuangyejin_data_list"
			:chuangyejin_data_list_cuozuo="chuangyejin_data_list_cuozuo"
			:chuangyejin_data_show="chuangyejin_data_show"
			:id="id"
			:cid="cid"
			@chuangyejin_data_add_close="chuangyejin_data_add_close"
			
		>
		</Dchuangyejin>
		<!--活动-->
		<Dhuodong
		ref="Dhuodongzu"
		:tieid="id"
		:quanid="cid"
		:huodong_data_show="huodong_data_show"
		@huodong_close_get="huodong_close_get"
		:huodong_data_list="huodong_data_list"
		:huodong_data_list_cuozuo="huodong_data_list_cuozuo"
		@refreshData="huodong_data_cunzai_api"
		>
		</Dhuodong>
			<Dzhifu
			:show="show"
			:payType="payType"
			:jine="jine"
			@close="show = false"
			@uidapi="getUid_api"
			></Dzhifu>
		<!--音频-->
		<Dyinpin
		    ref="Dyinpin_data"
			:tieid="id"
			:quanid="cid"
			:yinpin_data_show="yinpin_data_show"
			@yinpin_close_get="yinpin_close_get"
			:yinpin_data_list="tie"
			@refreshData="yinpin_data_cunzai_api"
		>
		</Dyinpin>
		<!--附件-->
		<Dfujian
		    ref="Dfujian_data"
			:tieid="id"
			:quanid="cid"
			:fujian_data_show="fujian_data_show"
			@fujian_close_get="fujian_close_get"
			:fujian_data_list="tie"
			@refreshData="fujian_data_cunzai_api"
		>
		</Dfujian>
		<!--url-->
		<Durl
		    ref="Durl_data"
			:tieid="id"
			:quanid="cid"
			:url_data_show="url_data_show"
			@url_close_get="url_close_get"
			:url_data_list="url_data_list"
			@refreshData="url_data_list_get"
		>
		</Durl>
		<uv-popup ref="baoming" zIndex="999999" round="10">
			<view class="d-kuan" :style="{height:baoming_gao}">
				<view class="d-neikuang-10" style="max-width: 400px; margin: 0 auto;">
					<view class="d-kuan " style="display: flex; justify-content: space-between; height: 50px; line-height: 50px; border-bottom: 1px solid #e0e0e0;">
						<view class="d-zuo" style="flex: 1; text-align: center;">名称</view>
						<!--view class="d-zuo" style="flex: 2; text-align: center;">联系</view-->
						
						<view class="d-you" style="flex: 1; text-align: center;">状态</view>
						<view class="d-you" style="flex: 1; text-align: center;">时间</view>
					</view>
					<view class="d-kuan d-hd-gao" :style="{height:baoming_gao_1}">
						<view v-for="(hd,index) in huodong_uid_list_data" :key="index" class="d-kuan " style="border-bottom: 15px solid #ffffff;" >
							<view class="d-neikuang-20 " style="background-color: #f5f5f5;">
								<view class="d-kuan d-wenzi-12 d-chaochu-1" style="line-height: 18px;">
									ID:{{ hd.uid }} 昵称：{{ hd.name }}  <text class="d-you">{{ hd.bmfl }} 份</text>
									</view>
									<view class="d-kuan " style="display: flex; justify-content: space-between; height: 50px; line-height: 50px;">
										
										<view class="d-zuo d-wenzi-12" style="flex: 2; text-align: left;line-height: 18px;margin-top: 8px">
											<view>手机：{{ hd.shoujihaoma }}</view>
											<view>微信：{{ hd.weixinhao }}</view>
										</view>
									
										<view class="d-you d-wenzi-12 d-shijian-0" style="flex: 1; text-align: center;">
											<view>{{hd.zhuangtai}}</view>
										
										</view>
										<view class="d-you d-wenzi-12 d-shijian-0" style="flex: 1; text-align: center;line-height: 18px;margin-top: 8px;">
										
											<view class="d-shijian-1" style=" ">{{hd.shijian}}</view>
										</view>
									</view>
									<view v-if="hd.cph != '0'" class="d-kuan d-wenzi-12 d-chaochu-1" style="line-height: 18px;border-top: 1px solid #e0e0e0;">
										车牌号：{{ hd.cph }}
									</view>
									<view v-if="hd.sfz.length > 0" class="d-kuan d-wenzi-12 " style="line-height: 18px;">
										<view v-for="(item,index) in hd.sfz" :key="index" style="border-top: 1px solid #e0e0e0;">
											<view class="d-wenzi-12">姓名：{{ item.ming }}</view>
											<view class="d-wenzi-12">身份证：{{ item.hao }}</view>
										</view>
									</view>

							</view>
						</view>

					</view>



				</view>
			</view>
		</uv-popup>
		<!--底部登录-->
		<Dweibudenglu
			ref="weibudenglu"
			:denglu_xianshi_weibu="denglu_xianshi_weibu"
			@denglu_close_get="denglu_close_get"
		>
		</Dweibudenglu>
		<!-- 自定义模态框组件 -->
		<uv-modal 
			ref="customModal" 
			title="请先加入圈子" 
			confirmText="确定加入" 
			cancelText="取消"
			:showCancelButton="true" 
			:customStyle="{
				background: 'linear-gradient(135deg, #4CAF50 0%, #9C27B0 100%)',
				color: '#FFFFFF'
			}"
			@confirm="jiaquan(this.cid)"
		>
		</uv-modal>
		<!--评论-->
		<Dpinglun
		    ref="weibupinglun"
			:pinglun_xianshi_weibu="pinglun_xianshi_weibu"
			:pinglunxianshi_dibu="pinglunxianshi_dibu"
			@pinglun_close_get="pinglun_close_get"
			:cmData="commentData" 
			@pinglun_tijiao="pinglun_tijiao"
			@load-more="handleLoadMore"
			@tiwenzhi="tiwenzhi"
			@pinglun_tijiao_dibu="pinglun_tijiao_dibu"
		>
		</Dpinglun>

	</view>

</template>

<script>
    import Api from '@/utils/api.js'; //postChuangyejin_data_add_api
	
	import QuanApi from '@/utils/quan_api.js';
	import HuodongApi from '@/utils/huodong_api.js';
	import ZanzhuApi from '@/utils/zanzhu_api.js';
	import UrlApi from '@/utils/url_api.js';
	import { getRequest,postRequest } from '@/utils/wxRequest.js';
    import DToubu from '@/components/d-toubu/d-toubu.vue';
	import NlAudioPlayer from '@/uni_modules/nl-audio-player/components/nl-audio-player/nl-audio-player.vue';
	import HbComment from '@/uni_modules/hb-comment/components/hb-comment/hb-comment.vue'; // 添加这行
	import Ddaohang from '@/components/d-daohang/d-daohang.vue'
	import Dchuangyejin from '@/components/d-chuangyejin/d-chuangyejin.vue'
	import Dchuangyeji_zhanshi from '@/components/d-chuangyejin/d-chuangyeji-zhanshi.vue'
	import Dzhifu from '@/components/d-zhifu/d-zhifu.vue'
	import Dhuodong from '@/components/d-huodong/d-huodong.vue'
	import Dhuodong_zhanshi from '@/components/d-huodong/d-huodong-zhanshi.vue'
	import Dyinpin from '@/components/d-yinpin/d-yinpin.vue'
	import Dzanzhu from '@/components/d-zanzhu/d-zanzhu.vue'
	import Dzanzhu_zhanshi from '@/components/d-zanzhu/d-zanzhu-zhanshi.vue'
	import Durl from '@/components/d-url/d-url.vue'
	import Durlzhanshi from '@/components/d-url/d-url-zhanshi.vue'
	import Dweibudenglu from '@/components/d-weibu-denglu/d-weibu-denglu.vue'
	import Dpinglun from '@/components/d-pinglun/d-pinglun.vue'
	import Dfujian from '@/components/d-fujian/d-fujian.vue'

	export default {
		data() {
			return {
				title: 'Hello',
				leftNavHeight: '500rpx', // 默认高度
                rightColWidth: '20%', // 默认宽度
				zhongjianWidth: '40%', // 默认宽度
				currentIndex: 0, // 当前轮播图索引																																															
                neirong_id_data:1,
				erjidata:[],
				erjiindex:'',//当前激活的二级菜单索引
				activeIndex: -1, // 当前激活的一级菜单索引

                yuedu:false,
				audioUrl:'/static/mp3/mp3.mp3',
				pinglunzxianshi:0,
				commentData: {
					readNumer: 0,
    				comment: [],
				},
				like_1: false, // 确保所有模板中用到的属性都已定义
				tiwenneirong:'',
				rightColLeft: '0px', // 添加这个属性
				denglu_xianshi:0, // 登录显示
				
				id: 0, // 帖子ID
				cid: 0, // 圈子ID	
				tie:[]	,//帖子数据	
				urls: [
					
				],
				dianzan_panduan:0, // 点赞判断
				dianzan_shu:0, // 点赞数量
				dianzan_touxiang:[], // 点赞头像

				shoucang_panduan:0, // 收藏判断
				shoucang_shu:0, // 收藏数量
				pinglun_list:[], // 评论列表
				page: 1, // 评论当前页码
				no_data:false, // 评论是否有数据
				pinglun_uid:'', // 评论用户ID
				pinglun_touid:'', // 评论回复用户ID
				pinglun_id:0, // 评论ID
				yinyong_neirong:'', // 评论引用内容
				nickName:'', // 评论用户昵称
				guanzhu_panduan:'0', // 判断关注
				yingcang_text:'', // 隐藏
				uid_admin:0, // 管理员判断
				shenhe_text:'', // 审核
				jindu_show:false, // 进度条
				jindu_data:{},
				jindu_cuozuo:0, // 进度操作 0是添加，1是修改

				jindu_data_show:false, // 进度操作 0是添加，1是修改
				jindu_data_add:{}, //添加详情数据
				jindu_data_list:[], // 进度列表数据
				jindu_data_list_cuozuo:0, //进度操作  0是添加，1是修改
				audioPlayers: {}, // 存储所有音频播放器的引用

				chuangyejin_data:{}, //创业金详情数据
				chuangyejin_data_list:[], //创业金列表数据
				chuangyejin_data_list_cuozuo:0, //创业金操作  0是添加，1是修改
				chuangyejin_data_show:false, //创业金操作  0是添加，1是修改
				chuangyejin_data_add:{}, //创业金添加详情数据
				
				huodong_data_show:false, //活动操作  0是添加，1是修改
				huodong_data_add:{}, //活动添加详情数据
				uid_data:{}, // 用户数据
				show:false, // 支付弹窗
				payType:'weixin', // 支付类型 1是支付宝，2是微信
				jine:0, // 金额
				huodong_data_list:{}, // 活动数据
				huodong_data_list_cuozuo:0, // 活动操作  0是添加，1是修改
				baoming_gao:'', // 报名高度
				baoming_gao_1:'', // 报名高度
				huodong_uid_list_data:[], // 活动用户列表数据

				yinpin_data_show:false, // 音频操作  0是添加，1是修改
				yinpin_data_add:{}, // 音频添加详情数据
				yinpin_data_list:[], // 音频列表数据
				yinpin_data_list_cuozuo:0, // 音频操作  0是添加，1是修改
				
				zanzhu_data:{}, //创业金详情数据
				zanzhu_data_list:[], //创业金列表数据
				zanzhu_data_list_cuozuo:0, //创业金操作  0是添加，1是修改
				zanzhu_data_show:false, //创业金操作  0是添加，1是修改
				zanzhu_data_add:{}, //创业金添加详情数据

				url_data_show:false, // 链接操作  0是添加，1是修改
				url_data_add:{}, // 链接添加详情数据
				url_data_list:[], // 链接列表数据
				url_data_list_cuozuo:0, // 链接操作  0是添加，1是修改
				url_data_zhanshi_show:false, // 链接操作  0是添加，1是修改
				
				denglu_xianshi_weibu:0,// 登录显示
				pinglun_xianshi_weibu:0,//移动评论
				pinglunxianshi_dibu:0,//底部评论

				fujian_data_show:false, // 附件操作  0是添加，1是修改
				fujian_data_add:{}, // 附件添加详情数据
				fujian_data_list:[], // 附件列表数据
				fujian_data_list_cuozuo:0, // 附件操作  0是添加，1是修改
				
				
			}
		},
        components: {
          DToubu,
		  NlAudioPlayer,
		  HbComment, // 添加这行
		  Ddaohang,
		  Dchuangyejin,
		  Dchuangyeji_zhanshi,
		  Dzhifu,
		  Dhuodong,
		  Dhuodong_zhanshi,
		  Dyinpin,
		  Dzanzhu,
		  Dzanzhu_zhanshi,
		  Durl,
		  Durlzhanshi,
		  Dweibudenglu,
		  Dpinglun,
		  Dfujian,
        },
		mounted() {
			
    	    this.setLeftNavHeight();
            this.getRightColWidth(); // 添加这行
			this.getzhongjianWidth(); // 添加这行
    	    // 添加窗口大小变化监听
    	    window.addEventListener('resize', this.setLeftNavHeight);
            window.addEventListener('resize', this.getRightColWidth); // 添加窗口大小变化监听
			window.addEventListener('resize', this.getzhongjianWidth); // 添加窗口大小变化监听
    	},
    	beforeDestroy() {
		    // 移除监听
		    window.removeEventListener('resize', this.setLeftNavHeight);
            window.removeEventListener('resize', this.getRightColWidth); // 添加这行
			window.removeEventListener('resize', this.getzhongjianWidth); // 添加窗口大小变化监听
			this.clearAllAudio();
			this.closeVideo();
		    },
		onShow(){
			this.getDianzan_panduan_api(); //点赞判断
			this.getShoucang_panduan_api(); //收藏判断
			this.getDianzan_touxiang_api(); // 点赞头像
			this.getPinglun_list_api(); // 获取评论列表
			this.getjindu_data_list(); // 获取进度列表
			//if(this.uid){this.getUid_api()}; // 获取用户信息
			this.huodong_data_cunzai_api(); // 调用获取活动详情的方法
			this.zanzhu_data_cunzai_api(); // 调用获取赞助金详情的方法
			this.url_data_list_get(); // 调用获取链接列表的方法

		},
		onLoad(e) {
			// 获取URL参数
			this.id = e.id || '';
    		this.cid = e.cid || '';
    		//console.log('获取到的参数:', {id: this.id, cid: this.cid});
			this.getTiezi_api(); // 调用获取帖子详情的方法
		},
		computed: {
		  	yidenglu() {
		  	  return (this.$store.state.memberuid && this.$store.state.keycode) ? 1 : 0;
		  	},
		  	touxiang() {
		  	  return this.$store.state.member? this.$store.state.member.avatar : '';
		  	},
		  	name1() {
		  	  return this.$store.state.member? this.$store.state.member.name : '';
		  	},
			uid() {
		  	  return this.$store.state.memberuid;
		  	},
		  	keycode() {
		  	  return this.$store.state.keycode;
		  	}
		},

		onUnload() {
  		  this.clearAllAudio();
  		  this.closeVideo();
  		},
		methods: {
			// 跳转到圈子页面
			quan_url(cid) {
				if (cid) {
					uni.navigateTo({
						url: '/pages/quanzi/index?id=' + cid
					});
				} else {
					console.error('cid参数为空，无法跳转');
				}
			},
			
			// 切换视频播放/暂停状态
				closeVideo(e) {
					try {
						// 阻止事件冒泡，防止与默认控件冲突
						if (e && e.stopPropagation) {
							e.stopPropagation();
						}
						 
						// 优先使用ref获取视频元素，如果ref不存在则使用querySelector
						let videoPlayer = null;
						if (this.$refs.videoPlayer) {
							videoPlayer = this.$refs.videoPlayer;
						} else {
							videoPlayer = document.querySelector('video');
						}
						 
						if (videoPlayer && typeof videoPlayer === 'object') {
							// 检查当前视频是否正在播放
							//console.log('视频当前状态:', videoPlayer.paused ? '暂停' : '播放');
							if (videoPlayer.paused) {
								// 如果暂停，则播放
								try {
									if (typeof videoPlayer.play === 'function') {
										videoPlayer.play();
									}
								} catch (e) {
									//console.log('视频播放失败:', e);
								}
							} else {
								// 如果正在播放，则暂停
								try {
									if (typeof videoPlayer.pause === 'function') {
										videoPlayer.pause();
									}
								} catch (e) {
									//console.log('视频暂停失败:', e);
								}
							}
					} else {
							//console.log('未找到视频元素或元素类型错误');
						}
					} catch (e) {
						//console.log('控制视频播放状态出错:', e);
					}
				},
				// 轮播图切换事件
				swiperChange(e) {
					this.currentIndex = e.detail.current;
				},
				// 预览图片
				previewImage(index) {
					//console.log('点击预览图片', index, this.tie?.tupian);
					if (this.tie && this.tie.tupian && this.tie.tupian.length > 0) {
						// tie.tupian直接包含URL数组
						const urls = this.tie.tupian;
						uni.previewImage({
							urls: urls,
							current: index,
							success: (res) => {
								//console.log('预览图片成功', res);
							},
							fail: (err) => {
								console.log('预览图片失败', err);
							}
						});
					}
				},
			
			//获取url的参数 id 和 cid
			getUrlParam(name) {
				const url = decodeURIComponent(window.location.href);
				const reg = new RegExp(`[?&]${name}=([^&]*)`, 'i');
				const match = url.match(reg);
				return match ? match[1] : '';
			},
			// ...其他方法保持不变...
			yiji(index) {
    		  // 切换激活的一级菜单
    		  this.activeIndex = index;
    		  // 根据激活的一级菜单显示对应的二级菜单
    		  this.erjidata = this.daohang[index].erji;
			  console.log(this.erjidata);
    		},
			erji(index) {
    		  // 切换激活的二级菜单
    		  this.erjiindex = index;
    		},
			toggleErji(index) {
    		  if (this.activeIndex === index) {
    		    // 点击已激活的菜单，收起二级菜单
    		    this.activeIndex = -1;
    		    this.currentErji = [];
    		  } else {
    		    // 点击新的菜单，显示对应的二级菜单
    		    this.activeIndex = index;
    		    this.currentErji = this.daohang[index].erji;
    		  }
    		},
			setLeftNavHeight() {
        	    // 获取系统信息
        	    const systemInfo = uni.getSystemInfoSync();
        	    // 计算可用高度（可根据实际需求调整计算方式）
        	    const windowHeight = systemInfo.windowHeight;
				const windowWidth = systemInfo.windowWidth; // 获取浏览器/设备宽度
				var baoming_gao_0 = windowHeight - 150;
				var baoming_gao_1 = windowHeight - 210;
				this.baoming_gao = `${baoming_gao_0}px`;
				this.baoming_gao_1 = `${baoming_gao_1}px`;

				//console.log(windowHeight);
				/*if(windowHeight >= 768){
					const headerHeight = 60; // 头部高度估计值
        	    	const calculatedHeight = windowHeight - headerHeight;
        	    	// 设置左边导航高度
        	    	this.leftNavHeight = `${calculatedHeight}px`;
				} else {
					const headerHeight = 0; // 头部高度估计值
        	    	const calculatedHeight = windowHeight - headerHeight;
        	    	// 设置左边导航高度
        	    	this.leftNavHeight = `${calculatedHeight}px`;
				}*/
				if(windowWidth >= 1221){
					const headerHeight = 60; // 头部高度估计值
					const calculatedHeight = windowHeight - headerHeight;
					// 设置左边导航高度
					this.leftNavHeight = `${calculatedHeight}px`;

				} else {
					const headerHeight = 0; // 头部高度估计值
        	    	const calculatedHeight = windowHeight - headerHeight;
        	    	// 设置左边导航高度
        	    	this.leftNavHeight = `${calculatedHeight}px`;
				}
				

        	},
            // ...其他方法...
            getRightColWidth() {
				const systemInfo = uni.getSystemInfoSync();
				const windowWidth = systemInfo.windowWidth; // 获取浏览器/设备宽度
               this.$nextTick(() => {
                 const query = uni.createSelectorQuery().in(this);
				 //获取浏览器的宽度
				 

                 query.select('#youbiankuan').boundingClientRect(rect => {
                   if (rect) {
                     /*this.rightColWidth = `${rect.width+20}px`;
                     console.log('右侧列宽度:', this.rightColWidth);*/
					 if(windowWidth > 1221) {
						this.rightColWidth = `${rect.width}px`;
					 } else {
						this.rightColWidth = '100%';
					 }
					 	
                    	this.rightColLeft = `${rect.left}px`; // 计算左侧位置
                    	//console.log('右侧列位置:', this.rightColLeft);
                   }
                 }).exec();
               });
            },
			getzhongjianWidth() {
				// 先获取系统信息
				const systemInfo = uni.getSystemInfoSync();
    			const windowWidth = systemInfo.windowWidth;
               this.$nextTick(() => {
                 const query = uni.createSelectorQuery().in(this);
				 
                 query.select('#zhongjiankuan').boundingClientRect(rect => {
                   if (rect) {
                     
					if(windowWidth > 1221) {
					 	this.zhongjianWidth = `${rect.width-20}px`;
					} else {
						this.zhongjianWidth = '100%';
					}
                    	//this.rightColLeft = `${rect.left}px`; // 计算左侧位置
                    	//console.log('右侧列位置:', this.rightColLeft);
                   }
                 }).exec();
               });
            },

            // 返回
            fanhui() {
				// 先清理音频
				this.clearAllAudio();
               // 获取页面栈
                 const pages = getCurrentPages();
                 // 如果页面栈长度小于等于1，说明没有上一级页面
                 if (pages.length <= 1) {
                    //console.log('没有上一级页面');
                    uni.reLaunch({
                      url: '/pages/index/index'
                    });
                 } else {
                    // 有上一级页面则返回
                    uni.navigateBack({
                      delta: 1
                    });
                }
            },
			fanhui_quan(cid){
				uni.reLaunch({
					url: '/pages/quanzi/index?id=' + cid
				});
			},
            neirong_id(e){
                this.neirong_id_data = e.id;
                console.log(e.id);
            },
            tiwen(e){
				if (!this.denglu_jiance()) return;
                //console.log('tiwen',e);
                this.yuedu = true;
            },
            yuedu_data(e){
				if (!this.denglu_jiance()) return false; // 明确返回 false
 				 //console.log('yudu0000000000000',e);
 				 this.yuedu = true;
 				 return true; // 执行成功返回 true
            },
            guanbi(){
                this.yuedu = false;
				if(this.$refs.audioPlayer) {
    			  const audioCtx = this.$refs.audioPlayer.getAudioContext();
    			  audioCtx.stop();
    			  audioCtx.destroy();
    			}
            },
			// 设置音频引用
			setAudioRef(el, tieId) {
    		  if (!this.audioPlayers) {
    		    this.audioPlayers = {};
    		  }
    		  if (el) {
    		    this.audioPlayers[tieId] = el;
    		  }
    		},
			
			// 检查音频URL是否有效
			isAudioSrcValid(src) {
			  if (!src || typeof src !== 'string') return false;
			  // 检查是否是有效的URL格式
			  const urlPattern = /^(https?:\/\/|\/).+\.(mp3|wav|ogg|m4a|aac)$/i;
			  return urlPattern.test(src);
			},
			
			// 处理音频错误
			onAudioError(err, tieId) {
			  console.error('音频播放错误 (ID:', tieId, '):', err);
			  // 显示提示信息给用户
			  uni.showToast({
			    title: '音频加载失败',
			    icon: 'none'
			  });
			},

			// 关闭播放音频
			clearAllAudio() {
    		  try {
    		    // 确保audioPlayers是对象
    		    if (this.audioPlayers && typeof this.audioPlayers === 'object') {
    		      for (let tieId in this.audioPlayers) {
    		        // 确保tieId是audioPlayers自身的属性
    		        if (Object.prototype.hasOwnProperty.call(this.audioPlayers, tieId)) {
    		          const audioPlayer = this.audioPlayers[tieId];
    		          // 只处理非空值
    		          if (audioPlayer && typeof audioPlayer === 'object') {
    		            // 尝试不同的方式来停止音频播放
    		            try {
    		              if (typeof audioPlayer.getAudioContext === 'function') {
    		                const audioCtx = audioPlayer.getAudioContext();
    		                if(audioCtx && typeof audioCtx.stop === 'function') {
    		                  //audioCtx.pause();
    		                }
    		                if(audioCtx && typeof audioCtx.destroy === 'function') {
    		                  audioCtx.destroy();
    		                }
    		              }
    		            } catch (error) {
    		              console.error('使用audioContext关闭音频失败:', error);
    		            }

    		            try {
    		              // 尝试直接调用组件的停止方法（如果有）
    		              if (typeof audioPlayer.stop === 'function') {
    		                //audioPlayer.pause();
    		              }
    		            } catch (error) {
    		              console.error('使用stop方法关闭音频失败:', error);
    		            }

    		            // 完全避免使用hasOwnProperty，采用更安全的方式设置播放状态
    		            try {
    		              // 只在audioPlayer是有效对象且不为null/undefined时尝试操作
    		              if (audioPlayer && typeof audioPlayer === 'object') {
    		                // 使用try-catch包装所有可能的操作，确保不会抛出异常
    		                try {
    		                  // 直接尝试设置playing属性为false，不进行任何检查
    		                  audioPlayer.playing = false;
    		                } catch (setError) {
    		                  // 静默失败，不打印错误日志，避免影响用户体验
    		                  // console.warn('尝试设置播放状态失败，但不影响功能:', setError);
    		                }
    		              }
    		            } catch (error) {
    		              // 最外层的异常捕获，确保方法不会中断
    		              // 同样静默失败，不打印错误
    		            }
    		          }
    		        }
    		      }
    		    }
    		    
    		    // 也处理旧的单个音频引用方式，保持兼容性
    		    if(this.$refs.audioPlayer) {
    		      try {
    		        const audioCtx = this.$refs.audioPlayer.getAudioContext();
    		        if(audioCtx && audioCtx.stop) {
    		          audioCtx.stop();
    		        }
    		        if(audioCtx && audioCtx.destroy) {
    		          audioCtx.destroy();
    		        }
    		      } catch (error) {
    		        console.error('关闭旧音频引用失败:', error);
    		      }
    		    }
    		  } catch (error) {
    		    console.error('关闭音频失败:', error);
    		  }
    		},
			// 关闭播放视频
			clearAllVideo() {
    		  try {
    		    if(this.$refs.videoPlayer && typeof this.$refs.videoPlayer === 'object' && typeof this.$refs.videoPlayer.pause === 'function') {
    		      this.$refs.videoPlayer.pause();
    		    }
    		  } catch (error) {
    		    console.error('暂停视频失败:', error);
    		  }
    		},
			// 音频开始播放时关闭其他音频和视频
			onAudioPlay(currentTieId) {
    		  //console.log('音频开始播放，ID:', currentTieId);
    		  // 先关闭所有其他音频
    		  this.clearAllAudio();
    		  // 等待短暂时间，确保其他音频都已停止
    		  setTimeout(() => {
    		    // 然后再播放当前点击的音频
    		    if (this.audioPlayers && this.audioPlayers[currentTieId]) {
    		      try {
    		        const currentAudio = this.audioPlayers[currentTieId];
    		        // 如果有播放方法，调用它
    		        if (currentAudio.play) {
    		          currentAudio.play();
    		        }
    		      } catch (e) {
    		        //console.log('播放当前音频失败:', e);
    		      }
    		    }
    		  }, 100);
    		  // 再关闭所有视频
    		  this.clearAllVideo();
    		},
			// 视频开始播放时关闭音频
			onVideoPlay() {
    		  //console.log('视频开始播放，尝试关闭音频');
    		  this.clearAllAudio();
    		},
			// 页面离开时关闭所有音视频
			onUnload() {
    		  this.clearAllAudio();
    		  this.clearAllVideo();
    		},
			add(e) {
    		  //console.log('add', e);
    		  // 这里可以添加评论逻辑
    		},
    		del(e) {
    		  //console.log('del', e);
    		  // 这里可以删除评论逻辑
    		},
    		like(e) {
    		  //console.log('like', e);
    		},
			focusOn(e) {
    		 // console.log('focusOn', e);
    		},
			tiwenzhi(uid,touid,id,yinyongneirong,jiaru){
				// 确保从 Vuex 获取最新值
				var pc = this.$store.state.kuan.pc;
				if (!this.uid) {
				    uni.showToast({
				        title: '未登录',
				        icon: 'none'
				    });
					this.denglu_xianshi_weibu = 1;
				    return;
				}
				
				if(this.tie.quan_jiaru !=1){
					uni.showToast({
					    title: '请加入圈子',
					    icon: 'none'
					});
					//弹出确定加入圈子
					this.$refs.customModal.open();
					//this.$refs.modal.open();
					return;
				}
				//判断是否空值uid
				if(!uid) {
    			    this.pinglun_uid = '';
    			    
    			} else {
    			    //用户
                    this.pinglun_uid = uid;
					console.log('tiwenzhi');
					if(pc){

					} else {
						this.pinglunxianshi_dibu = 1;
					}
				}
                if(pc){
					this.pinglunzxianshi = this.pinglunzxianshi === 1 ? 0 : 1;
				} else {
					this.pinglun_xianshi_weibu = 1;
				}
                
				
				this.nickName = touid;
				
				this.yinyong_neirong = yinyongneirong;
				//被评论的用户
				this.pinglun_touid = touid;
				//评论的id
				this.pinglun_id = id;
				//打印
				//console.log('评论用户',this.pinglun_uid,this.pinglun_touid,this.pinglun_id,this.yinyongneirong);
				if(this.pinglunzxianshi === 1) {
                    this.$nextTick(() => {
                        setTimeout(() => {
                            const textarea = this.$refs.commentTextarea?.$el?.querySelector('textarea');
                            if(textarea) {
                                textarea.focus();
                                // 将光标移动到文本末尾
                                const length = textarea.value.length;
                                textarea.setSelectionRange(length, length);
                            }
                        }, 100);
                    });
                }
                
				//console.log('pinglun',this.pinglunzxianshi);
            },
			// ... existing methods ...
			handleBlankClick(e) {
				const isCommentArea = e.target.closest('.d-pinglun-2') || 
			                        e.target.closest('.d-tijiao-0') ||
			                        e.target.closest('.uv-search') ||
			                        e.target.closest('.uv-textarea');
			
			    // 如果点击的是非评论区域且评论框是显示状态，则关闭评论框
			    if(!isCommentArea && this.pinglunzxianshi === 1) {
			        this.pinglunzxianshi = 0;
			    }
    		},
			handleTextareaBlur() {
    		    //this.pinglunzxianshi = 0;
				setTimeout(() => {
    			    this.pinglunzxianshi = 0;
    			}, 300);
    		},
			pinglun(){
				if (!this.denglu_jiance()) return;
				this.pinglunzxianshi = 1;
				//this.$refs.hbComment.focusOn();
			},
			//提交问答 
			//tieid:帖子id,uid用户id,code密钥,rid级别,content评论内容,
			pingluninput(e){
				var duixin = this; 
			    let newStr = '<p>' + e + '</p>';
			    let pingluncontent = newStr.replace(/\n/g,"</p><p>");
				this.tiwenneirong = pingluncontent;
				//打印
				//console.log('评论内容',this.tiwenneirong);
			},
			// 提交问答(评论)
			tijiao_wenda(){

				if (!this.denglu_jiance()) return;
			    //console.log('提交问答');
				const data = {
					id: this.id, // 帖子ID
					cid: this.cid, // 圈子ID
					uid: this.uid, // 用户ID
					code: this.keycode, // 密钥
					rid: this.pinglun_id, // 级别（0 表示普通）
				}
				var datas = "is_ajax=1&content="+this.tiwenneirong; //评论内容
				if(this.pinglun_id) {
					//console.log('回复的用户',this.pinglun_id);
				}
				var get_data = postRequest(Api.postPinglun(data.id,data.uid,data.code,data.rid),datas);
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code) {

						//this.pinglun_data = res.data.data;
						//显示提交成功
						uni.showToast({
						  title: res.data.msg,
						  icon: 'success',
						  duration: 2000
						});
						
						
						// 构造新评论对象
    					const newComment = {
    					    id: res.data.data.id || Date.now(), // 使用返回的ID或时间戳作为临时ID
    					    owner: false,
    					    hasLike: false,
    					    likeNum: 0,
    					    avatarUrl: this.$store.state.member?.avatar || '',
    					    nickName: this.$store.state.member?.name || '匿名用户',
    					    content: this.tiwenneirong,
    					    parentId: this.pinglun_id || null,
    					    createTime: new Date().toLocaleString(),
    					    children: [],
							yinyong: {
								author: this.nickName || '',
    						    content: this.yinyong_neirong || ''
    						}
    					};
						//清空输入框
						this.tiwenneirong = '';
					
    					// 将新评论添加到列表最前面
    					this.commentData.comment.unshift(newComment);
					
    					// 延迟关闭评论框
    					setTimeout(() => {
    					    this.pinglunzxianshi = 0;
    					}, 200);
						// 延迟关闭评论框，确保点击事件完成
						setTimeout(() => {
    					    this.pinglunzxianshi = 0;
    					}, 200);
						//提交回复后，把回复添加到 this.commentData.comment 里面，并且展示在第一条
						//刷新评论列表
						
						this.getPinglun_list_api(); //刷新评论列表



					} else {
						uni.showToast({
							icon: 'none',
							title: res.data.msg,
						});
					}
				})

			    
			    // 这里可以添加提交问答的逻辑
			},
			handleLoadMore({page, pageSize}) {
    		    //console.log('父组件-加载更多评论');
    		    this.page = page;
    		    // 这里可以添加加载更多评论的逻辑
			    this.getPinglun_list_api();
    		},
			// 评论列表
			getPinglun_list_api(){
				const params = {
    			    page: this.page || 1,
					pageSize:20,
    			    // 其他可能需要传递的参数
    			};
				
				const data = {
					id: this.id, // 帖子ID
					cid: this.cid, // 圈子ID
					uid: this.uid, // 用户ID
					code: this.keycode, // 密钥
					rid: 0, // 级别（0 表示普通）
				}
				var get_data = getRequest(Api.getPinglunNeirong(data.id,data.uid,data.code),params);
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code) {
						// 转换时间戳为日期格式
						//var list = res.data ? res.data.data : {};
						/*var list = res.data && res.data.data ? res.data.data : [];
        				this.haibao_data = list;*/
						this.pinglun_list = res.data.data;
						this.commentData.readNumer = res.data.data && res.data.data.commnets? res.data.data.commnets : 0;
						//重新 循环一下  评论列表
						/*
						"id": 1, // 唯一主键
						"owner": false, // 是否是拥有者，为true则可以删除，管理员全部为true
						"hasLike": false, // 是否点赞
						"likeNum": 2, // 点赞数量
						"avatarUrl": "", // 评论者头像地址
						"nickName": "超长昵称超长...", // 评论者昵称，昵称过长请在后端截断
						"content": "啦啦啦啦", // 评论内容
						"parentId": null, // 所属评论的唯一主键
						"createTime": "2021-07-02 16:32:07" // 创建时间
						*/
						// 格式化评论列表数据
						if(res.data.data && res.data.data.list.length > 0) {
            			    const pinglun_list_data = res.data.data && res.data.data.list.map(item => ({
								/*children : [
									{
										"id": item.rlist['id'], // 唯一主键
										"owner": false, // 是否是拥有者，为true则可以删除，管理员全部为true
										"hasLike": item.rlist['has_like'], // 是否点赞
										"likeNum": 2, // 点赞数量
										"avatarUrl": item.rlist['avatar'], // 评论者头像地址
										"nickName": item.rlist['author'], // 评论者昵称，昵称过长请在后端截断
										"content": item.rlist['content'], // 评论内容
										"parentId": null, // 所属评论的唯一主键
										"createTime": item.rlist.inputtime // 创建时间
									}
								] || [],*/
            			        id: item.id || 0,
            			        owner: item.is_owner || false,
            			        hasLike: item.has_like || false,
            			        likeNum: item.like_count || 0,
            			        avatarUrl: item.touxiang || '',
            			        nickName: item.author || '匿名用户',
            			        content: item.content || '',
            			        parentId: item.parent_id || null,
            			        createTime: item.inputtime,
								children: [], //item.rlist || 
								yinyong: item.yinyong || ''
            			    })); // .reverse()添加这行，将数组顺序反转;
            			    //this.commentData.comment = pinglun_list_data;
							// 修改这里：如果是第一页则覆盖，否则追加数据
							if(this.page === 1) {
                			    this.commentData.comment = pinglun_list_data;
                			} else {
                			    this.commentData.comment = [...this.commentData.comment, ...pinglun_list_data];
                			}
            			} else {
            			    // 没有更多数据时显示提示
            			    if(this.page > 1) {
								// 把没有更多数据的提示
            			       this.no_data = true;
            			        uni.showToast({
            			            title: '没有更多数据了',
            			            icon: 'none'
            			        });
            			    }
            			}
						//打印
						//console.log('评论列表',res.data.data && res.data.data.list);
						// 读取列表完成后直接拉到 id=“dibu”底部dibu
						// 滚动到底部
					} else {
						uni.showToast({
							icon: 'none',
							title: '获取失败，请稍后重试'
						});
					}
				})

			},
			denglu_jiance(){
				// 检查是否登录（通过Vuex状态判断）
				// 检查是否登录（通过Vuex状态判断）
  				const isLoggedIn = this.$store.state.memberuid && this.$store.state.keycode;
  				if (!isLoggedIn) {
  				  // 未登录，通过ref调用子组件的登录弹窗方法
  				  this.$refs.dToubu.dengluzhi();
  				  uni.showToast({
  				    title: '请先登录',
  				    icon: 'none'
  				  });
  				}
  				return isLoggedIn; // 返回登录状态    			    			    			    			    			    			    			    			
			},
			goumai(){
				// 先判断是否登录，如果没有登录，那么弹出 子组件中登录框
				// 检查是否登录（通过Vuex状态判断）
				if (!this.denglu_jiance()) return;
				// 已登录，执行购买逻辑
				//console.log('执行购买操作');
			},
			// 退出登录
			handleLogout() {
 			  // 用户退出时关闭阅读界面
 			  this.yuedu = false;

 			  // 停止并销毁音频
 			  if(this.$refs.audioPlayer) {
 			    const audioCtx = this.$refs.audioPlayer.getAudioContext();
 			    audioCtx.stop();
 			    audioCtx.destroy();
 			  }
			   this.getDianzan_panduan_api(); // 退出登录后重新获取点赞状态
			   this.getShoucang_panduan_api(); // 退出登录后重新获取收藏判断
			   this.huodong_data_cunzai_api();// 刷新活动数据
			   this.getTiezi_api();
 			},
			// 登录
			handleLogin() {
				this.getDianzan_panduan_api(); // 登录后重新获取点赞状态
				this.getShoucang_panduan_api(); //登录后重新获取收藏判断
				this.getTiezi_api();
				this.huodong_data_cunzai_api();// 刷新活动数据
				this.getUid_api();
			},
			// 发布登录
			denglu_fabu(){
				var pc = this.$store.state.kuan.pc;
				if(pc){
					if(this.yidenglu == 0){
					    this.denglu_xianshi = 1;
				    } else {
					    this.denglu_xianshi = 0;	
				    }
				} else {
					this.denglu_xianshi_weibu = 1;
				}
				//console.log('发布登录',this.denglu_xianshi);
				
			},
			// 更新判断是否登录
			handleUpdateDengluxianshi(value) {
			  this.denglu_xianshi = value;
			  //console.log('关闭登录',this.denglu_xianshi);
			},
			// 帖子接口
			getTiezi_api(){
				// id ,cid 参数
				const data = {
					id: this.id,
					cid: this.cid,
				}
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				if(uid){
					data.api_auth_uid = uid; // 用户ID
					data.api_auth_code = keycode; // 密钥
					data.is_ajax = 1; // 1 是ajax请求
				}
				var get_data = getRequest(Api.getTiezi(),data);
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code==1) {
						// 转换时间戳为日期格式
						//var list = res.data ? res.data.data : {};
						/*var list = res.data && res.data.data ? res.data.data : [];
        				this.haibao_data = list;*/
						this.tie = res.data.data[0] || {};
						
						this.jindu_data = res.data.data?.[0]?.jindu_index ?? {};
						//打印
						//console.log('帖子详情',this.jindu_data);	
						if(this.tie.gongkai == 1) {
							this.yingcang_text = '隐藏';
						} else {
							this.yingcang_text = '公开';
						}
						if(this.tie.status == 1) {
							this.shenhe_text = '通过';
						} else if(this.tie.status == 2) {
							this.shenhe_text = '拒绝';
						} else {
							this.shenhe_text = '待审核';
						}
						// 获取到帖子数据后再获取关注状态
						this.getGuanzhu_panduan_api();
						
					} else {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					}
				})

			},
			// 点赞判断
			getDianzan_panduan_api(){
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;

				// id ,cid 参数
				const data = {
					id: this.id,
					cid: this.cid,
				}
				
				var get_data = getRequest(Api.getDianzan_panduan(uid,keycode),data);
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					
					if(res.data.code && res.data.data.code > 2) {
						this.dianzan_panduan = 0;
						this.dianzan_shu = res.data.data.data;
					} else if(res.data.code && res.data.data.code == 1) {
						this.dianzan_panduan = 1;
						this.dianzan_shu = res.data.data.data;
					} else {
						this.dianzan_panduan = 0;
						this.dianzan_shu = res.data.data.data;
					}
				})
			},
			// 点赞头像
			getDianzan_touxiang_api(){
				const data = {
					id: this.id,
					cid: this.cid,
				}
				var get_data = getRequest(Api.getDianzan_touxiang(),data);
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code ) {
						this.dianzan_touxiang = res.data.data;
					} else {
						uni.showToast({
							icon: 'none',
							title: '获取失败，请稍后重试'
						});
						
					}
				})

			},
			// 点赞提交数据
			postDianzan_api(jiaru){
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				if (!uid || !keycode) {
    			    uni.showToast({
    			        title: '未登录',
    			        icon: 'none'
    			    });
					this.denglu_xianshi_weibu = 1;
    			    return;
    			}
				if(jiaru !=1){
					uni.showToast({
					    title: '请加入圈子',
					    icon: 'none'
					});
					//弹出确定加入圈子
					this.$refs.customModal.open();
					//this.$refs.modal.open();
					return;
				}
				// id,cid 参数
				const data = {
					id: this.id,
					cid: this.cid,
				}
				var get_data = postRequest(Api.postDianzan(uid,keycode),data);
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code==1) {
						this.dianzan_panduan = 1;
						this.dianzan_shu = res.data.data.data;
						// 提示
						uni.showToast({
							icon: 'success', //有效的 icon 值为 success, loading, none
							title: '点赞成功'
						});
						this.getDianzan_touxiang_api(); // 点赞头像
					} else {
						this.dianzan_panduan = 0;
						this.dianzan_shu = res.data.data.data;
						// 提示
						uni.showToast({
							icon:'success', //有效的 icon 值为 success, loading, none
							title: '取消点赞'
						});
						this.getDianzan_touxiang_api(); // 点赞头像
					}
				})
			},

			// 收藏判断
			getShoucang_panduan_api(){
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;

				// id ,cid 参数
				const data = {
					id: this.id,
					cid: this.cid,
				}
				
				var get_data = getRequest(Api.getShoucang_panduan(uid,keycode),data);
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code && res.data.data.code > 2) {
						this.shoucang_panduan = 0;
						this.shoucang_shu = res.data.data.data;
					} else if(res.data.code && res.data.data.code == 1) {
						this.shoucang_panduan = 1;
						this.shoucang_shu = res.data.data.data;
					} else {
						this.shoucang_panduan = 0;
						this.shoucang_shu = res.data.data.data;
					}
				})
			},
			// 收藏提交数据
			postShoucang_api(jiaru){
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				if (!uid || !keycode) {
    			    uni.showToast({
    			        title: '未登录',
    			        icon: 'none'
    			    });
					this.denglu_xianshi_weibu = 1;
    			    return;
    			}
				if(jiaru !=1){
					uni.showToast({
					    title: '请加入圈子',
					    icon: 'none'
					});
					//弹出确定加入圈子
					this.$refs.customModal.open();
				
					return;
				}
				// id,cid 参数
				const data = {
					id: this.id,
					cid: this.cid,
				}
				var get_data = postRequest(Api.postShoucang(uid,keycode),data);
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code==1) {
						this.shoucang_panduan = 1;
						this.shoucang_shu = res.data.data.data;
						// 提示
						uni.showToast({
							icon: 'success', //有效的 icon 值为 success, loading, none
							title: '收藏成功'
						});
					} else {
						this.shoucang_panduan = 0;
						this.shoucang_shu = res.data.data.data;
						// 提示
						uni.showToast({
							icon:'success', //有效的 icon 值为 success, loading, none
							title: '取消收藏'
						});
					}
				})
			},
			//加圈
			jiaquan(id){
				const uid = this.$store.state.memberuid;
			    const keycode = this.$store.state.keycode;
				if (!uid || !keycode) {
				    uni.showToast({
				        title: '未登录',
				        icon: 'none'
				    });

					var pc = this.$store.state.kuan.pc;
					if(pc){
						this.denglu_xianshi = 1; //pc
					} else {
						this.denglu_xianshi_weibu = 1; //移动
					}
				    return;
				}
				const data = {
					id: id
				}
				var post_data = postRequest(QuanApi.postJiaquan(uid,keycode),data);
				var res;
				post_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.data && res.data.data.code==1) {
						// 提示
						uni.showToast({
							icon: 'success', //有效的 icon 值为 success, loading, none
							title: '加入成功'
						});
						this.getTiezi_api();//加入成功更新帖子
					} else {

						// 提示
						uni.showToast({
							icon:'success', //有效的 icon 值为 success, loading, none
							title: '退出成功'
						});
					}
				})
			},
			huifu_2(e){
				if (!this.denglu_jiance()) return;
				//console.log('huifu_2',e);
				this.pinglunzxianshi = 1;
			},
			// 判断关注
			getGuanzhu_panduan_api(){
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;

				// id ,cid 参数
				const data = {
					uid: uid,
					touid: this.tie.uid,
				}
				// 打印
				//console.log('touid:',this.tie);
				
				var get_data = getRequest(Api.getGuanzhu_panduan(uid,keycode),data);
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code ) {
						this.guanzhu_panduan = res.data.data && res.data.data.guanzhu;
					} else {
						this.guanzhu_panduan = 0;
					}
					
				})

			},
			// 关注提交数据
			postGuanzhu_api(){
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				if (!uid ||!keycode) {
    			    uni.showToast({
    			        title: '未登录',
    			        icon: 'none'
    			    });
					this.denglu_xianshi_weibu = 1;
    			    return;
				}
				// id,cid 参数
				const data = {
					uid: uid,
					touid: this.tie.uid,
				}

				var get_data = postRequest(Api.postGuanzhu(uid,keycode),data);
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.data && res.data.data.code==1) {
						this.guanzhu_panduan = 1;
						
						// 提示
						uni.showToast({
							icon: 'success', //有效的 icon 值为 success, loading, none
							title: '关注成功'
						});
					} else {
						this.guanzhu_panduan = 0;
						
						// 提示
						uni.showToast({
							icon:'success', //有效的 icon 值为 success, loading, none
							title: '取消关注'
						});
					}
				})

			},
			//隐藏
			getYingcang_api(){
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				// id,cid 参数
				const data = {
					id: this.id,
					cid: this.cid,
				}
				var get_data = getRequest(QuanApi.getYincang(uid,keycode),data);
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.data && res.data.data.gongkai==1) {
						
						this.yingcang_text = '隐藏';
						// 提示
						uni.showToast({
							icon: 'success', //有效的 icon 值为 success, loading, none
							title: '公开成功'
						});
					} else { 
						
						this.yingcang_text = '公开';
						// 提示
						uni.showToast({
							icon:'success', //有效的 icon 值为 success, loading, none
							title: '隐藏成功'
						});
					}
				})
			},
			// 隐藏图标点击事件
			yincang_get(){
				//console.log('yincang_get',this.tie.yincang);
				this.getYingcang_api();
				this.getTiezi_api();
			},
			// 删除
			getDel_tie(){
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				// id,cid 参数
				const data = {
					id: this.id,
					cid: this.cid,
				}
				var get_data = getRequest(QuanApi.getDel_tie(uid,keycode),data);
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code==1) {
						// 提示
						uni.showToast({
							icon: 'success', //有效的 icon 值为 success, loading, none
							title: '删除成功'
						});
						// 跳转链接到 cid 值
						uni.navigateTo({
							url: '/pages/quanzi/index?id='+this.cid
						});
						
					} else {
						// 提示
						uni.showToast({
							icon:'success', //有效的 icon 值为 success, loading, none
							title: '删除失败'
						});
					}
				})
			},
			// 删除图标点击事件
			del_get(){
				// 确认删除
				uni.showModal({
					title: '删除',
					content: '确定删除吗？',
					success: (res) => {
						if (res.confirm) {
							// 执行删除操作
							this.getDel_tie();
						}
					}
				});
				
			},
			// 跳转修改页面
			edit_get(){
				//console.log('edit_get',this.id);
				uni.navigateTo({
					url: '/pages/fabu/edit?id='+this.id+'&cid='+this.cid
				});
			},
			// 审核
			shenhe_get(){
				this.$refs.shenhe.open();
			
			},
			// 审核通过
			getShenhe_tong_api(){
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				// id,cid 参数
				const data = {
					id: this.id,
					cid: this.cid,
					status: 1 // 1 表示通过
				}
				var get_data = getRequest(QuanApi.getShenhe_tong(uid,keycode),data);
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code==1) {
						// 提示
						uni.showToast({
							icon: 'success',
							title: '审核通过'
						});
						// 刷新数据
						this.getTiezi_api();
					} else {
						uni.showToast({
							icon: 'none',
							title: '审核失败'
						});
					}
				}).catch(() => {
					// 处理错误
					uni.showToast({
						icon: 'none',
						title: '网络错误'
					});
				});
			},
			// 审核拒绝
			getShenhe_jujue_api(){
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				// id,cid 参数
				const data = {
					id: this.id,
					cid: this.cid,
					status: 2 // 2 表示拒绝
				}
				var get_data = getRequest(QuanApi.getShenhe_jujue(uid,keycode),data);
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code==1) {
						// 提示
						uni.showToast({
							icon: 'success',
							title: '已拒绝'
						});
						// 刷新数据
						this.getTiezi_api();
					} else {
						uni.showToast({
							icon: 'none',
							title: '操作失败'
						});
					}
				}).catch(() => {
					// 处理错误
					uni.showToast({
						icon: 'none',
						title: '网络错误'
					});
				});
			},
			// 添加进度
			postJindu_api(){
				//判断 this.jindu_data.title不能位空 停止执行下一步
				this.jindu_cuozuo = 0;
				if(this.jindu_data.title==''){
					uni.showToast({
						icon:'none', //有效的 icon 值为 success, loading, none
						title: '请填写标题'
					});
					return; // 停止执行下一步
				}
				//判断 this.jindu_data.beizhu不能位空
				if(this.jindu_data.beizhu==''){
					uni.showToast({
						icon:'none', //有效的 icon 值为 success, loading, none
						title: '请填写备注'
					});
					return; // 停止执行下一步
				}
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				// id,cid 参数
				const data = {
					id: this.id,
					cid: this.cid,
					title: this.jindu_data.title,
					beizhu: this.jindu_data.beizhu,
					status: 1 // 1 表示通过
				}
				var post_data = postRequest(QuanApi.postJindu(uid,keycode,this.id),data);
				var res;
				post_data.then(duixin_data => {
					res = duixin_data;
					if(res.data && res.data.data.code==1) {
						// 提示
						uni.showToast({
							icon: 'success',
							title: '添加进度'
						});
						this.jindu_show = false;
						// 清空数据
						this.jindu_data = {
							title: '',
							beizhu: ''
						}
						// 刷新数据
						this.getTiezi_api();
					} else {
						uni.showToast({
							icon: 'none',
							title: '添加失败'
						});
					}
				}).catch(() => {
					// 处理错误
					uni.showToast({
						icon: 'none',
						title: '网络错误'
					});
				});
			},
			//进度弹窗
			jindu_get(){
				if(this.tie.jindu == 1){
					uni.showToast({
						icon: 'none',
						title: '进度进行中'
					});
				} else {
					this.jindu_show = true;
				}
			},
			//进度修改
			jindu_xiugai(id){
				this.jindu_cuozuo = 1; // 1是修改
				this.jindu_show = true;
				//弹出窗口
				this.jindu_data.title = this.tie.jindu_index && this.tie.jindu_index.title;
				this.jindu_data.beizhu = this.tie.jindu_index && this.tie.jindu_index.beizhu;
				//判断  this.jindu_data.title 不能为空
				if(this.jindu_data.title == ''){
					uni.showToast({
						icon:'none', //有效的 icon 值为 success, loading, none
						title: '请填写标题'
					});
					return; // 停止执行下一步
				}
				if(this.jindu_data.beizhu==''){
					uni.showToast({
						icon:'none', //有效的 icon 值为 success, loading, none
						title: '请填写备注'
					});
					return; // 停止执行下一步
				}
				

			},
			// 提交修改
			postJindu_xiugai_api(jindu_id){
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				// id,cid 参数
				const data = {
					id: this.id,
					cid: this.cid,
					title: this.jindu_data.title,
					beizhu: this.jindu_data.beizhu,
					zhuangtai: this.jindu_data.zhuangtai
					
				}
				var post_data = postRequest(QuanApi.postJindu_xiugai(uid,keycode,this.id),data);
				var res;
				post_data.then(duixin_data => {
					res = duixin_data;
					if(res.data && res.data.data.code==1) {
						// 提示
						uni.showToast({
							icon: 'success',
							title: '修改成功'
						});
						this.jindu_show = false;
						// 刷新数据
						this.getTiezi_api();
					} else {
						uni.showToast({
							icon: 'none',
							title: '修改失败'
						});
					}
				}).catch(() => {
					// 处理错误
					uni.showToast({
						icon: 'none',
						title: '网络错误'
					});
				});
			},
			// 修改进度
			jindu_data_id(id,data_id){
				//console.log('jinduid000：',id,data_id);
			},
			//进度详情列表
			getjindu_data_list(){
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				var get_data = getRequest(QuanApi.getJindu_data_list(uid,keycode,this.id));
				var res;
				get_data.then(duixin_data => {
					res = duixin_data;
					if(res.data.code==1) {
						// 提示
						this.jindu_data_list = res.data.data;
					}
					
				}).catch(() => {
					// 处理错误
					uni.showToast({
						icon: 'none',
						title: '网络错误'
					});
					
				});
				
			},
			// 弹出添加
			jindu_data_add_get(id,cid){
				this.jindu_data_show = true;
				
			},
			//关闭添加
			jindu_data_add_close(){
				this.jindu_data_show = false;
				// 清空数据
				this.jindu_data_add = {
					title: '',
					zhuangtai: 0,
					id: '',
					
				}
				this.jindu_data_list_cuozuo = 0;
			},
			//添加详情列表
			postJindu_data_add_api(){
				//判断 this.jindu_data.title不能位空 停止执行下一步
				this.jindu_data_list_cuozuo = 0;
				if(this.jindu_data_add.title==''){
					uni.showToast({
						icon:'none', //有效的 icon 值为 success, loading, none
						title: '请填写标题'
					});
					return; // 停止执行下一步
				}
				
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				// id,cid 参数
				const data = {
					id: this.id,
					cid: this.cid,
					title: this.jindu_data_add.title,
					
				}
				var post_data = postRequest(QuanApi.postJindu_data_add(uid,keycode,this.id),data);
				var res;
				post_data.then(duixin_data => {
					res = duixin_data;
					if(res.data && res.data.data.code==1) {
						// 提示
						uni.showToast({
							icon: 'success',
							title: '添加进度'
						});
						this.jindu_data_show = false;
						// 清空数据
						this.jindu_data_add = {
							title: '',
							zhuangtai: 0,
							id: '',
						}
						// 刷新数据
						this.getTiezi_api();
						this.getjindu_data_list();
					} else {
						uni.showToast({
							icon: 'none',
							title: '添加失败'
						});
						// 清空数据
						this.jindu_data_add = {
							title: '',
							zhuangtai: 0,
							id: '',
						}
					}
				}).catch(() => {
					// 处理错误
					uni.showToast({
						icon: 'none',
						title: '网络错误'
					});
				});
			},
			// 修改进度详情
			jindu_data_xiugai(index,id){
				this.jindu_data_list_cuozuo = 1;
				this.jindu_data_show = true;
				this.jindu_data_add.title = this.jindu_data_list[index].title;
				this.jindu_data_add.zhuangtai = this.jindu_data_list[index].zhuangtai;
				this.jindu_data_add.id = this.jindu_data_list[index].id;
				this.jindu_data_add.index = index;
				
			},
			//	提交修改
			postJindu_data_xiugai_api(id){
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				// id,cid 参数
				const data = {
					id: id,
					title: this.jindu_data_add.title,
					zhuangtai: this.jindu_data_add.zhuangtai,
					index: this.jindu_data_add.index,
					tieid: this.id,
				}
				var post_data = postRequest(QuanApi.postJindu_data_xiugai(uid,keycode,id),data);
				var res;
				post_data.then(duixin_data => {
					res = duixin_data;
					if(res.data && res.data.data.code==1) {
						// 提示
						uni.showToast({
							icon: 'success',
							title: '修改成功'
						});
						this.jindu_data_show = false;
						this.jindu_data_add = {
							title: '',
							zhuangtai: 0,
							id: '',
							
						}
						this.jindu_data_list_cuozuo = 0;
						// 刷新数据
						this.getTiezi_api();
						this.getjindu_data_list();
					} else {
						uni.showToast({
							icon: 'none',
							title: '修改失败'
						});
					}
				}).catch(() => {
					// 处理错误
					uni.showToast({
						icon: 'none',
						title: '网络错误'
					});
				});
			},
			// 删除进度
			jindu_index_shanchu(id){
				uni.showModal({
					title: '提示',
					content: '确定删除吗？',
					success: (res) => {
						if (res.confirm) {
							// 确认删除
							this.postJindu_index_shanchu_api(id);
						} else if (res.cancel) {
							
						}
					}
				});
			},
			postJindu_index_shanchu_api(id){
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				// id,cid 参数
				const data = {
					id: id,
				}
				var post_data = postRequest(QuanApi.postJindu_shanchu(uid,keycode,id),data);
				var res;
				post_data.then(duixin_data => {
					res = duixin_data;
					if(res.data && res.data.data.code==1) {
						// 提示
						uni.showToast({
							icon: 'success',
							title: '删除成功'
						});
						// 刷新数据
						this.getTiezi_api();
						this.getjindu_data_list();
					} else {
						uni.showToast({
							icon: 'none',
							title: '删除失败'
						});
					}
				}).catch(() => {
					// 处理错误
					uni.showToast({
						icon: 'none',
						title: '网络错误'
					});
				});
			},

			//	删除详情进度
			jindu_data_shanchu(id){
				uni.showModal({
					title: '提示',
					content: '确定删除吗？',
					success: (res) => {
						if (res.confirm) {
							// 确认删除
							this.postJindu_data_shanchu_api(id);
						} else if (res.cancel) {
							
						}
					}
				});
			},
			
			//	删除详情进度接口
			postJindu_data_shanchu_api(id){
				// 确保从 Vuex 获取最新值
				const uid = this.$store.state.memberuid;
                const keycode = this.$store.state.keycode;
				// id,cid 参数
				const data = {
					id: id,
				}
				var post_data = postRequest(QuanApi.postJindu_data_shanchu(uid,keycode,id),data);
				var res;
				post_data.then(duixin_data => {
					res = duixin_data;
					if(res.data && res.data.data.code==1) {
						// 提示
						uni.showToast({
							icon: 'success',
							title: '删除成功'
						});
						// 刷新数据
						this.getTiezi_api();
						this.getjindu_data_list();
					} else {
						uni.showToast({
							icon: 'none',
							title: '删除失败'
						});
					}
				}).catch(() => {
					// 处理错误
					uni.showToast({
						icon: 'none',
						title: '网络错误'
					});
				});
			},
			// 创业金  
			chuangyejin_get(){
				this.chuangyejin_data_show = true;
			},
			// 关闭弹窗
			chuangyejin_data_add_close(){
				this.chuangyejin_data_show = false;
			},
			// 活动
			huodong_get(){
				this.huodong_data_show = true;
			},
			huodong_close_get(){
				this.huodong_data_show = false;
			},
			handleUiddata(uiddata){
				this.uid_data = uiddata;
			},
			show_zhifu(){
				//console.log('传值到父组件true');
				this.show = true;
			},
			// 获取个人信息
			getUid_api(){
				this.$refs.dChuangyejin.chuangyejin_cunzai_api();
				const uid = this.$store.state.memberuid;
			    const keycode = this.$store.state.keycode;
				//判断  uid 和 keycode 同时存在，才执行下一步
				if(!uid || !keycode) {

					return;
				}
				var get_data = getRequest(Api.getUID(uid,keycode));
				var res;	
				get_data.then(duixin_data => {
					res = duixin_data;	
					if(res.data.code) {
						// 转换时间戳为日期格式
						var list = res.data ? res.data.data : {};

						this.uid_data = list;	
						// 判断是否还有更多数据
					}
				})
			},
			// 判断是否有活动
			async huodong_data_cunzai_api() {
				let uid = this.$store.state.memberuid;
				let code = this.$store.state.keycode;
				var id = this.id;
				var cid = this.cid;
				let url = HuodongApi.getHuodong_cunzai_api(uid,code,id,cid);
				let res = await getRequest(url);
				if(res.data.code==1){
					// 如果res.data.data是对象，则包装成数组
					this.huodong_data_list = res.data.data;
					this.huodong_data_list_cuozuo = 1;
					
				} else {
					this.huodong_data_list_cuozuo = 0;
				}
				//console.log('活动数据11111',this.huodong_data_list_cuozuo);
			},
			//报名列表
			baoming_uid_list(hdid){
				this.$refs.baoming.open('bottom');
				this.huodong_uid_list_api(hdid);
			},
			// 活动用户列表
			huodong_uid_list_api(hdid){
				
					let uid = this.$store.state.memberuid;
					let code = this.$store.state.keycode;
					var id = this.id;
					var cid = this.cid;
					let url = HuodongApi.getHuodong_uid_list_api(uid,code,id,cid,hdid); // 使用传入的hdid参数
					let get_data = getRequest(url);
					
					get_data.then(duixin_data => {
						let res = duixin_data;
						// 添加错误检查
						if(res && res.data && res.data.code == 1){
							// 如果res.data.data是对象，则包装成数组
							this.huodong_uid_list_data = res.data.data; 	
							//console.log('活动用户列表',this.huodong_uid_list_data);
						} else {
							this.huodong_uid_list_data = [];
						}
					}).catch(() => {
						// 处理错误
						this.huodong_uid_list_data = [];
					});
			},
			// 音频
			yinpin_get(){
				/*if(this.tie.yinpin && this.tie.yinpin[0]){
					this.$refs.audioPlayer.pause();
				}*/
				this.yinpin_data_show = true;
			},
			yinpin_close_get(){
				this.yinpin_data_show = false;
			},
			// 附件
			fujian_get(){
				this.fujian_data_show = true;
			},
			fujian_close_get(){
				this.fujian_data_show = false;
			},
			// 关闭弹窗
			fujian_data_add_close(){
				this.fujian_data_show = false;
			},
			// 更新帖子音频数据
			yinpin_data_cunzai_api(){
				this.getTiezi_api();//刷新帖子数据
			},
			//赞助
			zanzhu_get(){
				this.zanzhu_data_show = true;
			},
			zanzhu_close_get(){
				this.zanzhu_data_show = false;
			},
			// 关闭弹窗
			zanzhu_data_add_close(){
				this.zanzhu_data_show = false;
			},
			// 判断是否有赞助金
			async zanzhu_data_cunzai_api() {
				let uid = this.$store.state.memberuid;
				let code = this.$store.state.keycode;
				var id = this.id;
				var cid = this.cid;
				let url = ZanzhuApi.getZanzhu_cunzai_api(uid,code,id,cid);
				let res = await getRequest(url);
				if(res.data.code==1){
					// 如果res.data.data是对象，则包装成数组
					this.zanzhu_data_list = res.data.data;
					this.zanzhu_data_list_cuozuo = 1;

				} else {
					this.zanzhu_data_list_cuozuo = 0;
				}
				//console.log('赞助金数据11111',this.zanzhu_data_list_cuozuo);
			},
			//个人主页
			getgeren(uid){
				uni.navigateTo({
					url: '/pages/u/index?uid='+uid,
				})
			},
			// 链接
			async url_get(){
				await this.url_data_list_get();
				this.url_data_show = true;
			},
			url_close_get(){
				this.url_data_show = false;
			},
			// 关闭弹窗
			url_data_add_close(){
				this.url_data_show = false;
			},
			// url列表
			async url_data_list_get(){
				let uid = this.$store.state.memberuid;
				let code = this.$store.state.keycode;
				var id = this.id;
				var cid = this.cid;
				let url = UrlApi.getUrlList(uid,code,id,cid);
				let res = await getRequest(url);
				if(res.data.code==1){
					// 如果res.data.data是对象，则包装成数组
					if (typeof res.data.data === 'object' && res.data.data !== null && !Array.isArray(res.data.data)) {
						this.url_data_list = [res.data.data];
					} else if (Array.isArray(res.data.data)) {
						this.url_data_list = res.data.data;
					} else {
						this.url_data_list = [];
					}
				} else {
					this.url_data_list = [];
				}
			},
			denglu_close_get(){
				//console.log('关闭登录');
				this.denglu_xianshi_weibu = 0;
			},
			denglu_weibu(){
				this.denglu_xianshi_weibu = 1;
			},
			pinglun_close_get(){
				this.pinglun_xianshi_weibu = 0;
			},
			// 评论提交
			pinglun_tijiao(neirong){
				this.tiwenneirong = neirong;
				this.tijiao_wenda();

			},
			// 底部评论提交
			pinglun_tijiao_dibu(){
				this.pinglunxianshi_dibu = 0;
			},
			//下载
			xiazai_get(){
				

			},
			//更新帖子
			fujian_data_cunzai_api(){
				this.getTiezi_api();//刷新帖子数据
			},
			// 下载文件
			fujian_api(url,title,jiaru){
				var pc = this.$store.state.kuan.pc;
				if (!this.uid) {
				    uni.showToast({
				        title: '未登录',
				        icon: 'none'
				    });
					this.denglu_xianshi_weibu = 1;
				    return;
				}
				if(jiaru !=1){
					uni.showToast({
					    title: '请加入圈子',
					    icon: 'none'
					});
					//弹出确定加入圈子
					this.$refs.customModal.open();

					return;
				}
				if(pc){
					//this.pinglunzxianshi = this.pinglunzxianshi === 1 ? 0 : 1;
				} else {
					//this.pinglun_xianshi_weibu = 1;
				}
				console.log('开始下载文件，URL:', url);
				// 检查URL是否存在
				if (!url) {
					console.error('下载URL为空');
					uni.showToast({
						title: '下载链接无效',
						icon: 'error'
					});
					return;
				}

				// 判断是否为H5环境
				// #ifdef H5
				// 下载附件逻辑
				console.log('H5环境，使用浏览器下载方式');
				try {
					uni.downloadFile({
						url: url, //文件链接
						success: (res) => {
							if (res.statusCode === 200) {
								var oA = document.createElement("a");
								oA.download = title || '下载文件'; // 设置下载的文件名，默认是'下载'
								oA.href = res.tempFilePath; //临时路径再保存到本地
								document.body.appendChild(oA);
								oA.click();
								 oA.remove(); // 下载之后把创建的元素删除
							}
						},
						fail: (err) => {
							uni.showToast({
								icon: 'none',
								mask: true,
								title: '失败请重新下载',
							});
						},
					})
					
					// 显示下载提示
					uni.showToast({
						title: '文件开始下载',
						icon: 'success',
						duration: 3000
					});
				} catch (browserError) {
					console.error('使用a标签下载失败，尝试备用方法:', browserError);
					// 方法2：使用fetch API获取blob的方式下载
					console.log('尝试使用fetch API获取blob方式下载');
					fetch(url)
						.then(response => {
							if (!response.ok) {
								throw new Error('网络响应错误: ' + response.status);
							}
							return response.blob();
						})
						.then(blob => {
							console.log('获取blob成功，开始下载');
							// 创建blob URL
							const blobUrl = window.URL.createObjectURL(blob);
							const link = document.createElement('a');
							link.href = blobUrl;
							// 提取文件名
							const fileName = url.substring(url.lastIndexOf('/') + 1).split('?')[0];
							link.download = fileName;
							link.style.display = 'none';
							document.body.appendChild(link);
							link.click();
							
							// 清理资源
							setTimeout(() => {
								document.body.removeChild(link);
								window.URL.revokeObjectURL(blobUrl);
							}, 100);
							
							uni.showToast({
								title: '文件开始下载',
								icon: 'success',
								duration: 3000
							});
						})
						.catch(blobError => {
							console.error('使用blob方式下载失败:', blobError);
							// 方法3：备用方案 - 在新窗口打开，让用户自己保存
							try {
								console.log('尝试在新窗口打开文件');
								window.open(url, '_blank');
								uni.showToast({
									title: '已在新窗口打开文件，请手动保存',
									icon: 'success',
									duration: 3000
								});
							} catch (fallbackError) {
								console.error('所有下载方式都失败:', fallbackError);
								uni.showToast({
									title: '下载失败，请尝试右键链接选择"另存为"',
									icon: 'error',
									duration: 3000
								});
							}
						});
				}
				// #endif
			}

		}
	}
</script>

<style scoped lang="scss">

	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		/*justify-content: center;*/
		background-color: #f3f3f3;
        /*padding-top: 70px;*/
		/*height: 100vh;*/ /* 添加全屏 */
		/*width: 100vw;*/ /* 添加全屏*/

	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
	/* 屏幕宽度大于786px时隐藏uni-page-head */
    @media (min-width: 786px) {
        uni-page-head {
            display: none !important;
            opacity: 0 !important;
            height: 0 !important;
            visibility: hidden !important;
        }
    }
	/* 添加在style部分 */
	.d-daohang-zuo {
    position: fixed;
    left: 0;
    
    width: 180rpx;
    height: calc(100vh - 70rpx);
    background: #f5f5f5;
    z-index: 100;
	box-shadow: 2px 0 5px rgba(177, 177, 177, 0.1);
  }
  
  .d-daohang-you {
    position: fixed;
    left: 180rpx;
    
    width: 180rpx;
    height: calc(100vh - 70rpx);
    background: #fff;
    z-index: 999;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  }
  .d-erji-item {
    height: 60rpx;
    line-height: 60rpx;
    padding: 0 20rpx;
   /* border-bottom: 1px solid #f0f0f0;*/
  }
  
  .d-erji-item:active {
    background: #f5f5f5;
  }
  @mixin flex($direction: row) {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: $direction;
	}
	.uv-nav-slot {
		@include flex;
		align-items: center;
		justify-content: space-between;
		border-width: 0.5px;
		border-radius: 100px;
		border-color: #dadbde;
		padding: 3px 7px;
		opacity: 0.8;
        
	}
    ::v-deep .uv-navbar {
      border-radius: 20rpx;
    }

	.you-guding {
		position: fixed;

		top: 0; /* 根据头部高度调整 */
		/*box-shadow: -2px 0 5px rgba(0,0,0,0.1);*/
		transition: all 0.3s ease;
	}
	/* 大于786px时的样式 */
	@media screen and (min-width: 1221px) {
		.d-bianhua-10 {
			padding: 30px;
		}
		.pc-zuo-520 {
			margin-left: 520rpx;
		}
		.you-guding {
			position: fixed;
				
			top: 60px; /* 根据头部高度调整 */
			/*box-shadow: -2px 0 5px rgba(0,0,0,0.1);*/
			transition: all 0.3s ease;
		}
			
		
	}

			

	/*@font-face {
		font-family: 'icon';
		src: url('//at.alicdn.com/t/c/font_4943412_hwr994uqfdf.woff2?t=1749392833400') format('woff2'), url('//at.alicdn.com/t/c/font_4943412_hwr994uqfdf.woff?t=1749392833400') format('woff'),
			url('//at.alicdn.com/t/c/font_4943412_hwr994uqfdf.ttf?t=1749392833400') format('truetype');
	}*/

	.audio-control-wrapper {
		margin-top: 20rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		font-family: 'icon' !important;
	}

	.audio-control {
		font-size: 62rpx;
		line-height: 1;
		padding: 16rpx;
		color: #12d1b1;
		font-size: 80rpx;
	}

	.audio-control-prev {
		transform: rotate(180deg);
	}

	.audio-control-switch {
		font-size: 80rpx;
		margin: 0 100rpx;
	}
	.beijing-pinglun {
		background-color: #eeeeee;
	}
	.warp_jindu {
		display: flex;
		align-items: center;
		justify-content: center;
		height: 100%;
	}

	.rect_jindu {
		width: 300px;
		/*height: 300px;*/
		padding: 10px;
		background-color: #fff;
		border-radius: 10px;
	}
	
	/* 设置高度高于1000rpx并允许上下滚动 */
	.d-hd-gao {
		/*height: 900rpx;*/ /* 高于1000rpx */
		overflow-y: auto; /* 允许垂直滚动 */
		overflow-x: hidden; /* 禁止横向滑动 */
	}
	
	/* 自定义滚动条样式 */
	.d-hd-gao::-webkit-scrollbar {
		width: 1px; /* 滚动条宽度 */
	}
	
	.d-hd-gao::-webkit-scrollbar-track {
		background: #f1f1f1; /* 滚动条轨道背景 */
	}
	
	.d-hd-gao::-webkit-scrollbar-thumb {
		background: #888; /* 滚动条颜色 */
	}
	
	.d-hd-gao::-webkit-scrollbar-thumb:hover {
		background: #555; /* 鼠标悬停时滚动条颜色 */
	}


</style>
